link error

I’m practicing NeHe’s tutorial example–Setting Up An OpenGL Window (anybody hear of him?) However, I met with such error:

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

fullscreen.exe - 2 error(s), 0 warning(s)

the header files I’ve included: windows.h, gl.h, glu.h and glaux.h
the program has WinMain() func.

Anybody ever met with such problems? Or any suggestions? thanks.

I think you have more than likely created a Win32 Console project which expects a main( ) function.

All the NeHe tutorials (that I’ve got through so far) require a Win32 application which contains WinMain( ) not Main( ).

Just start a new Win32 application and copy/paste all the code across…

Thanks a lot. It works! I may go ahead now.
You’ve go through all the tutorials? Well, I still have a long way to go.