freeglut-3.0.0's include/GL/freeglut_std.h includes the wrong header files for darwin/GLX builds:
#ifdef FREEGLUT_GLES
# include <EGL/egl.h>
# include <GLES/gl.h>
# include <GLES2/gl2.h>
#elif __APPLE__
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
#else
# include <GL/gl.h>
# include <GL/glu.h>
#endif
Note that __APPLE__ implies using OpenGL.framework's headers instead of Mesa's headers. This should be configurable. You should only use OpenGL.framework if using CGL and use GL/* when using GLX.
This is compounded by the fact that it looks like (other than that header), you actually don't support CGL builds. CMakeLists.txt seems to support Win32, Blackberry/Android, and GLX. Why do you have that OpenGL.framework include there if you're not even supporting CGL? That doesn't really make sense.
Are these header files incompatible? Do they break something? Please post any relevant error messages of whatever fails.
Yes, they are incorrect and possibly incompatible. You should use the headers for the libraries you're linking against.
This would be like using lesstif headers and linking against openmotif or using ffmpeg headers and linking against libav or using glut headers and linking against freeglut for that matter.
Since you don't even support AGL, just remove the block. I don't know why it's there in the first place. That's what we did in MacPorts, and everything seems fine.
Dear Jeremy,
Please note that a discussion thread is now opened on the mailing
list. Your further discussion is much welcomed there. As John said, if
there is an actual issue you ran accross due to the include, please do
let us know (here or mailing list).
All the best,
Dee
On Tue, Mar 31, 2015 at 8:45 PM, Jeremy Huddleston Sequoia
jeremyhu@users.sf.net wrote:
Related
Bugs: #221
Thanks for the advice, which in general is sound. This is not a discussion board however, it's a bug report, so again, please post the details of the exact problem you are facing as a result of freeglut including the OpenGL framework headers as opposed to the Mesa OpenGL headers.
Please refrain from answering with any more general programming advice, or about how confusing you find the fact that we include the OpenGL framework headers, and stick to the bug and its symptoms.