PDA

View Full Version : GLUT link error !



aksuvari
02-23-2004, 11:53 PM
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..

Ysaneya
02-24-2004, 12:05 AM
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.

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

-- Tom

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