View Full Version : Unresolved external symbol _main
04-29-2004, 12:06 PM
Sorry to bother everyone again but I keep getting this "unresolved external symbol _main" and i have no idea what to do.
I know I probably sound like a noob but.. well.. I am.
If anybody has any time to spare I would really appreciate it.
04-29-2004, 12:28 PM
there are two kinds of projects, console projects and win32 projects. each has its own entry point
Win32 expects WinMain(...)
console expects main()
either change your project from a console app to a win32 app, or change the main function to a winmain function.
04-29-2004, 12:55 PM
(nervous chuckle).. I've tried to change the project to a win32 app but I'm not sure on how to go about it. Should I just start a new win32 project and paste the old code in it or is there some better way to do it?
04-29-2004, 01:39 PM
I can't tell how your code is structured, but I would suggest just scrapping it and starting a win32 app. just renaming to winmain might require a lot more hacking than it's worth, and it's not something it seems you would have a good time doing.
From MSDEV, file->new->win32 application
or file->new->MFCApp wizard (exe)
If you're familiar with MFC you should probably use that while you're learning OpenGL, it cuts down on the mundane OS code that needs to be written.
04-29-2004, 01:54 PM
Thanks a lot but unfortunately I have no idea what MFC is so I guess I'll stick with win32. Thanks again.
04-29-2004, 02:11 PM
YES!!! I got it to work FINALLY. The unresolved external main error was actually coming from a seperate linked file so all I had to do was define main there and the error dissapeared.
Thanks for all the help!
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.