PDA

View Full Version : something wrong with my vc++???



allen_dog
02-01-2004, 03:23 AM
/////////////////////////////////////////////
#include <GL/glut.h>
#include <stdlib.h>
void main()
{
}
I can not tell , so simple code can not be builded! and the error:
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/test_2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

test_2.exe - 2 error(s), 0 warning(s)
Could you help me my friends.Thanks

roffe
02-11-2004, 01:11 PM
Add /SUBSYSTEM:console to your linking options when creating using c main() entry points.

woleksy
02-11-2004, 02:40 PM
I was getting the same broblem, go to preferances/properties (don't remember what it is called) and go to link and system and change from a windows app to a conslo app. The compiler is looking for winmain because you are making a windows app.