View Full Version : GLUT link error !

02-23-2004, 10:53 PM
below is a simple code sample :
#include <GL\glut.h>
void display (void);
void main (int argc, char **argv)
glutInit (&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (500, 500);
glutInitWindowPosition (0,0);
glutCreateWindow ("OpenGL");
void display (void)
and following is a link error concerning the above code sample:
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/opengl_sample.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

so what is the matter and solution for it?
(i am using visual c++ 6.0 compiler under win2K)

thank you..

02-23-2004, 11:05 PM
There is a lot of solutions like: reading the manuals, reading tutorials on how to set up a window with glut, learning how to use VC++ properly, posting to the correct forum (ie. not the advanced one), and optionnally creating the correct project type in VC++ (a console application) ?


Tom Nuydens
02-23-2004, 11:06 PM
What Ysaneya said. This is not an advanced question, nor is it even an OpenGL question. Thread closed.

-- Tom

02-24-2004, 02:29 PM
Moving to the toolkits forum.