Hi,all. I downloaded some code from Nehe.
And found the following message when I link it:
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Third.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Third.exe - 2 error(s), 0 warning(s)
I had imported opengl32.lib,glu32.lib,glut32.lib into my project.I used VC++6.0 to run the code.
What did I miss?
If you have no “main” in a C program, you probably have a WinMain somewhere, and you need to set your compiler to compile a “windows program” instead of a “command line prog”.
This is not opengl, this C/C++ programming.
I really found the winmain function.
But how to set my compiler to compile a “windows program” instead of a “command line prog”.
I’m new to opengl and new to C++,too.
I use VC++6.0 to compile the code.
Thank you for your help!!
For a windows program you should create a Win32 application. For a console app you should create a Win32 console application.