problem with 'glut.h' and .cpp files

To install glut, i followed the directions found here

but for some odd reason, my compiler rejects the glut.h header file with a complaint about an overloading violation. The complaint goes away and it compiles only if I make the file that includes it a .c file, rather than a .cpp file. I KNOW that glut should work in C++, so why can’t it be a .cpp file?

Is teh header embedded in extern “C” construction? Anyway, you shoudl use freeglut ( instead of the outdated original library…

the OpenGL tutorial I’m using uses GLUT, so I’d rather not move to something else, at least not now.
But you said outdated, is there a newer version of GLUT available?

Yes, there is a newer version of GLUT available, it is called freeglut :stuck_out_tongue: See my first post!

That article states: freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT)

Correct me if I’m wrong but an alternative seems different than an updated version.

Yes, but you miss a most important point:

The original GLUT library seems to have been abandoned with the most recent version (3.7) dating back to August 1998. Its license does not allow anyone to distribute modified library code. This would be OK, if not for the fact that GLUT is getting old and really needs improvement. Also, GLUT’s license is incompatible with some software distributions (e.g., XFree86).

Anyway, freeglut is a glut implementation (meaning 100% backward compatible) that supports more platforms and compilers and is newer. If you insist on using the old glut, fell free to modify its header files to work with your compiler…