PDA

View Full Version : linking glut



Mickey_dup1
03-13-2006, 06:17 AM
Hi, I have some problem to link glut to my project (.NET2003). Linker get these errors:

filter_anisotropic error LNK2019: unresolved external symbol ___glutCreateMenuWithExit@8 referenced in function _glutCreateMenu_ATEXIT_HACK@4
filter_anisotropic error LNK2019: unresolved external symbol ___glutCreateWindowWithExit@8 referenced in function _glutCreateWindow_ATEXIT_HACK@4
filter_anisotropic error LNK2019: unresolved external symbol ___glutInitWithExit@12 referenced in function _glutInit_ATEXIT_HACK@8
filter_anisotropic fatal error LNK1120: 3 unresolved externals
filter_anisotropic warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
filter_anisotropic warning LNK4098: defaultlib 'LIBC' conflicts with use of other libs; use /NODEFAULTLIB:libraryWhat am I wronging? Thanks

ZbuffeR
03-13-2006, 08:20 AM
If you don't need to register exit functions, do this before including any .h :

#define GLUT_DISABLE_ATEXIT_HACK

or use freeglut or other modern glut ports.

marshallcp
03-15-2006, 09:01 PM
I have the same problem with you .when I link glut to my project (vc++6.0),somethings are wrong:

aindex.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
aaindex.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
Debug/aaindex.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

when I use "#define GLUT_DISABLE_ATEXIT_HACK",succeed to link.

But I execute the project ,there are still errors: can't intialize the debugging subsysterm.

I am a beginner,please help me

marshallcp
03-15-2006, 09:03 PM
I have the same problem with you .when I link glut to my project (vc++6.0),somethings are wrong:

aindex.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
aaindex.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
Debug/aaindex.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

when I use "#define GLUT_DISABLE_ATEXIT_HACK",succeed to link.

But I execute the project ,there are still errors: can't intialize the debugging subsysterm.

I am a beginner,please help me