Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help! Easy Question About Compiling....

Posted on 2000-03-11
16
Medium Priority
?
233 Views
Last Modified: 2012-05-04
I'm new to VC++ 6.0 and I am creating a Control Panel Applet using VC++ 6.0 and Visual Basic 6.0. But, when I try and build the project in VC++ it gives me this error in the debug window:

Compiling...
cplmain.c
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/cplmain.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

cplmain.exe - 2 error(s), 0 warning(s)


Any ideas? I really need this quick and I haven't been able to fin the answer any where else.  Thanks in advance!
0
Comment
Question by:swhitlow
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
  • +2
16 Comments
 
LVL 5

Expert Comment

by:Wyn
ID: 2608877
Shut down the linking with MFC option in the project setting.
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2608904
Btw:It seems you choose a .exe project.But for control panel,you'd choose a dll project.
0
 

Author Comment

by:swhitlow
ID: 2608905
I don't have it linking in with it.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:eugene007
ID: 2608915
Please check your header files.

Regards

Eugene
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2608924
If you choose console project but write WinMain or some like that and vice versa,you got this!!
Choose the right project.
0
 

Author Comment

by:swhitlow
ID: 2608965
This might help solve this problem, this was a VC++ 5.0 project that I brought into VC++ 6.0. I don't know if that would make a difference or not. Is there anyone I could sent this project to so you could take a look at it?  Thanks!
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609027
You can mail to yinansuibi@163.net
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609028
Btw:I dont think that's your problem
Again,a contrl panel should be .dll.Why yours is .exe?
0
 

Author Comment

by:swhitlow
ID: 2609038
mine is not an .exe, it's a .dll. Actually, it will be a .cpl file when it's done but it's simply a dll file.
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609046
That's what I have mentioned.
How this comes?
Debug/cplmain.exe

You'd change the project.
0
 

Expert Comment

by:YuraPhink
ID: 2609158
This Linker Error says that you did not defined the main function!
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609161
->This Linker Error says that you did not defined the main function!
=================
As I have mentioned more than 3 times,please check the correct project(dll).

Regards
W.Yinan
0
 
LVL 22

Accepted Solution

by:
nietod earned 400 total points
ID: 2609328
swhitlow, VC things you are trying to compile a win32 console program, which must have a main() function as an entry point.  

You need to compiler a DLL program.  You may be able to fix this by going to the linker options in the project settings and adding the "/DLL" option.

If that doesn't work, you can just recreate the project as a DLL project.   Delete all the project files.  (.dsp and .dsw) but leave the source code files.  Then create a new project and be sure the select the win32 DLL option for the prioject type.  Then add the source code files to the project using the "Project" menu "Add to Project" item "Files" item.
0
 

Author Comment

by:swhitlow
ID: 2609635
Thanks very much to everyone that responded. I noticed after I resolved the error that some other people had the same solution as nietod, but, no one explained it in such an easy to understand way as he did.  Thanks!
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2609682
Hmm , maybe I'm too lazy:(
0
 
LVL 22

Expert Comment

by:nietod
ID: 2609707
Sometimes it helps to come to a question late and see what was NOT said--not that I expected to get the points on this one.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question