Im trying to run a sipmple program in c++ using openGL but get these errors... can somebody please help me?

Error 1 error LNK2028: unresolved token (0A00002D) "extern "C" int __stdcall __glutCreateWindowWithExit(char const ,void (__cdecl)(int))" (?__glutCreateWindowWithExit@@$$J18YGHPBDP6AXH@Z@Z) referenced in function "extern "C" int __stdcall `anonymous namespace'::glutCreateWindow_ATEXIT_HACK(char const *)" (?glutCreateWindow_ATEXIT_HACK@?A0x6d0c8cb1@@$$J14YGHPBD@Z) c:\Users\Surané\documents\visual studio 2010\Projects\glut test\glut test\glut test.obj glut test

Error 2 error LNK2019: unresolved external symbol "extern "C" int __stdcall __glutCreateWindowWithExit(char const ,void (__cdecl)(int))" (?__glutCreateWindowWithExit@@$$J18YGHPBDP6AXH@Z@Z) referenced in function "extern "C" int __stdcall `anonymous namespace'::glutCreateWindow_ATEXIT_HACK(char const *)" (?glutCreateWindow_ATEXIT_HACK@?A0x6d0c8cb1@@$$J14YGHPBD@Z) c:\Users\Surané\documents\visual studio 2010\Projects\glut test\glut test\glut test.obj glut test

Error 3 error LNK1120: 2 unresolved externals c:\users\surané\documents\visual studio 2010\Projects\glut test\Debug\glut test.exe 1 1 glut test

Those errors coming from the use of a library suggest that you aren't properly linking to it. Did you make sure to link to the .lib/.dll file for OpenGL, or just include headers?

This question has already been answered. Start a new discussion instead.