Just my luck, the very first program I tried to use with freeglut on mingw uncovered an issue.
The pulsar.c program uses double variables "near" and "far". When compiled with glut.h (the real one) this is fine. When compiled with glut.h (from freeglut) the preprocessor converts this:
double near = 0.0;
double = 0.0;
Tracked it down to windef.h where the lines:
are found. These are there to allow ancient 16 bit code to compile. windef.h is included by windows.h, which freeglut pulls in, but glut does not. pulsar is a command line program, so it doesn't really need anything from windows.h.
Not sure who/what supplies windef.h, either gcc or mingw. It is possible to leave it out with
-D_WINDEF_H on the command line, but since other programs might actually need something in windef.h, I am working around this by modifying my copy like this:
Until it is fixed generally perhaps this merits one line of warning somewhere in the readme.
Log in to post a comment.