Red Hat Bugzilla – Bug 18952
GL/glut.h cannot be safely used from C++
Last modified: 2007-04-18 12:29:17 EDT
stdlib.h contains a prototype for the exit() function. If included from C++
this prototype defines exceptions that can be thrown by exit.
GL/glut.h also prototypes exit() (together with reams of comments
explaining why they had to do such a stupid thing). This is quite safe from
C as stdlib.h contains a normal prototype. Sadly for C++ the prototypes
conflict and gcc generates an error.
Compiling tuxracer (0.60.1) will demonstate this problem should
reproduction prove difficult. I worked around by removing the prototype
from glut.h but obviously this may impact other areas.
We've noticed (and fixed) this a couple of days ago; it's fixed in 3.3-7.
Until the package appears in Rawhide, you can download it at