We help IT Professionals succeed at work.

Help! Easy Question About Compiling....

swhitlow
swhitlow asked
on
252 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!
Comment
Watch Question

Wyn

Commented:
Shut down the linking with MFC option in the project setting.
Wyn

Commented:
Btw:It seems you choose a .exe project.But for control panel,you'd choose a dll project.

Author

Commented:
I don't have it linking in with it.
Please check your header files.

Regards

Eugene
Wyn

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

Author

Commented:
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!
Wyn

Commented:
You can mail to yinansuibi@163.net
Wyn

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

Author

Commented:
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.
Wyn

Commented:
That's what I have mentioned.
How this comes?
Debug/cplmain.exe

You'd change the project.
This Linker Error says that you did not defined the main function!
Wyn

Commented:
->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
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
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!
Wyn

Commented:
Hmm , maybe I'm too lazy:(

Commented:
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.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.