Problem linking with glut

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

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

Please, where should I donwload the files of glut?

Originally posted by coredump:
[b]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[/b]

here are the pre-compiled lib and dll for Intel machines. for any other platform, go here

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

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>

Thanks, I´ve put the define and it worked properly.

Fernando Fernandes