PDA

View Full Version : Problem linking with glut



bozzao
05-02-2002, 08:56 AM
Hello, any idea why I am getting this error? I am linking with glut32.lib.

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

Thanks

Fernando Fernandes

coredump
05-02-2002, 09:15 AM
my guess is those functions aren't in your glut32.lib. make sure you're using the correct library (you obviously have the correct header or they would've generated a compiler error).

b

bozzao
05-02-2002, 09:18 AM
Please, where should I donwload the files of glut?


Originally posted by coredump:
my guess is those functions aren't in your glut32.lib. make sure you're using the correct library (you obviously have the correct header or they would've generated a compiler error).

b

coredump
05-02-2002, 10:03 AM
here (http://www.opengl.org/developers/documentation/glut/glutdlls37beta.zip) are the pre-compiled lib and dll for Intel machines. for any other platform, go here (http://www.opengl.org/developers/documentation/glut/index.html)

[This message has been edited by coredump (edited 05-02-2002).]

Bob
05-02-2002, 10:57 AM
Some compilers, in combination with some versions of GLUT (I think), have problems with those *WithExit functions. Try put a #define GLUT_DISABLE_ATEXIT_HACK before you include <GL/glut.h>

bozzao
05-06-2002, 08:10 AM
Thanks, Ive put the define and it worked properly.

Fernando Fernandes