glut.h in mingw
Cosmin Truta <[email protected]>
| Newsgroups | gmane.comp.gnu.mingw.patches |
|---|---|
| Message-ID | <[email protected]> |
Hi, This thread is derived from Re: Predefine _M_IX86 in gcc. I was mentioning earlier the oddity of having the glut libraries but not the header. Instead of removing the libraries, it would really nice to add the header to the mingw package! I was curious why I needed to do a certain hack on the latest glut.h (specifically, to remove some prototypes that the linker expects and dies when it doesn't find them in libglut32.a). Eventually, I realized that libglut.a and libglut32.a currently supplied with mingw belong to an older version, i.e. 3.6 (latest stable) instead of 3.7.6 (late beta). So I suggest to include glut.h from http://www.opengl.org/developers/documentation/glut/ http://www.opengl.org/developers/documentation/glut/glutdlls36.zip into /mingw/include/GL/ The nicest part is that it works unmodified with mingw, and even with cygwin if -DWIN32 is passed to the cygwin-gcc cmd line. As a side note (related to the other _M_IX86 thread), this is a version that does include <windows.h>, unlike the newer ones. At least it's good that it *works*. My tests show that the executables run well with GLUT32.DLL from 3.6 to 3.7.6. To test it yourself, you should find plenty of test programs. But if you are in a hurry, you can get a very basic one from here: http://www.cs.toronto.edu/~cosmin/test/teapot.c Best regards, Cosmin ------------------------------------------------------- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/