Unresolved external symbol _main

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.

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.

(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?

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.

Thanks a lot but unfortunately I have no idea what MFC is so I guess I’ll stick with win32. Thanks again.

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!