Something wrong with my vc++?

#include <GL/glut.h>
#include <stdlib.h>
void main()
I can not tell , so simple code can not be builded! and the error:
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

Add /SUBSYSTEM:console to your linking options when creating using c main() entry points.

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.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.