Yet another OpenGL error!!!

I got yet another error using OpenGl. I downloaded Borland’s Version of the glut32.h file, and I am getting this error three times.

[C++ Error] GLUT.H(481): E2451 Undefined symbol ‘exit’

If someone could tell me what I need to define exit as, or if they could send my their working glut.h, please respond and then I will give you my email.

-J. Hess

i think thats included in stdlib.h but i could be wrong (look in help)

Yeah, it is in that header file, but for some reason it is not realizing that it is. If you try to declare it then it gives the error multiple declerations of ‘exit’. I don’t know why, I have been working for almost 2 hours on it but can’t figure it out.

-EssayGeon

Just to be on the safe side… are you including stdlib.h before glut.h?

If this doesn’t work, try manually inserting #include <stdlib.h> at the top of glut.h.

HTH,

Henry

It is a problem with Borland and C++ GLUT programs. The problem is the exit function so the original glut.h has to be hacked. Including stdlib.h before glut.h should work. If this is not the case can you try the original headers from: http://www.xmission.com/~nate/glut.html
and put
#define GLUT_DISABLE_ATEXIT_HACK
before including glut.h

Another try could be the GLUT libraries and headers from : http://www.gnt.net/~heiman/

All this is of course very unfortunate, it seems like the result is depending on which headers are included and the order.