GLUT link error !

hi,
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”);
glutDisplayFunc(display);
glutMainLoop();
}
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…

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) ?

Y.

What Ysaneya said. This is not an advanced question, nor is it even an OpenGL question. Thread closed.

– Tom

Moving to the toolkits forum.