-
Help Me!!
I get the following error in vc++ 6 when linking and cannot continue, rebuilding (all) and cleaning does not help!!!!
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
-
Re: Help Me!!
You seem to be using the wrong type of project. If you are using GLUT then (I think) that you need to have a Win32 console application. If you are not using GLUT then a Win32 application is the type of project that you need.
Good luck
Kevin
-
Re: Help Me!!
Of course doing a clean build didn't fix it. You created a console app, and you have NO MAIN FUNCTION!
Say it with me...
Win32 Console app = main() entry point
Win32 Application = WinMain() entry point
Any questions?
-
Advanced Member
Frequent Contributor
Re: Help Me!!
You can also force entry point (I prefer main(), since it's more portable than WinMain), regardless if you're building a Console or Windows app.
The command line flag for using main() is:
/entry:mainCRTStartup
There is probably a similar setting accessible from the IDE too.
Now you can use main() - always (for building GLUT Windows applications too)!
-
Re: Help Me!!
The thing is, it is already a WinMain() function. Anyone got any other suggestions???
-
Junior Member
Regular Contributor
Re: Help Me!!
It may well be a WinMain() function - but is that in a project type of "Win32 console Application" or "Win32 Application"
The "console" part is important!
Look at what Latrans said!
-Mezz
-
Re: Help Me!!
Stupid, Stupid, Stupid. (Bashes Head Against Desk)!!!
I started a new project (Win32 App), added a C++ source file, copied the code and presto. It worked.
Thanks!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules