Unresolved external symbol _main?

While trying to compile my first open gl application I got the following error and was wondering how I could fix it up…

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

If anyone can help me…
Denis.

That seems to be a common problem. People either try to use Glut in a main() function in a project that tries to look for WinMain as the entry point, or they create a project that uses main() as the entry point and try to create the OGL Window using Win32 code in a WinMain.

If you are using VC++, you need to start your project as a Win32 Application if you want to use a WinMain()… if you want to use a main() (usually for use with Glut) you need to start your project as a Win32 Console Application. If you want to use MFC, well then start it as an MFC app.

Thanks a lot

We all got to start off somewhere