PDA

View Full Version : macro #define GLUT_DISABLE_ATEXIT_HACK



wqyun84
03-31-2010, 06:50 PM
Hi,
I just started to use OpenGL. I downloaded header files, libs and dlls. However when I created new projects, I always have to put this macro defination in my code, or else there will be errors(VC6.0 and VS2005 have the same questions):
1>main.obj : error LNK2019: unresolved external symbol __imp____glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8
1>main.obj : error LNK2019: unresolved external symbol __imp____glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4
1>C:\Documents and Settings\jwang\My Documents\Visual Studio 2005\Projects\OpenGL\Debug\Test.exe : fatal error LNK1120: 2 unresolved externals
Does anyone know the reason? Pleae help me. Thanks in advance!

Alfonse Reinheart
03-31-2010, 08:06 PM
Are you using GLUT or FreeGLUT? I'm on VS2008, but I don't have to do this with FreeGLUT.

wqyun84
03-31-2010, 08:25 PM
I don't know the difference between GLUT or FreeGLUT, but I think I am using GLUT. Do you know their differences?

ZbuffeR
04-01-2010, 02:32 AM
freeglut is like glut but maintained :)