From the start of Box2D/glui/GL/glui.h
Code:
#if defined(GLUI_FREEGLUT)
// FreeGLUT does not yet work perfectly with GLUI
// - use at your own risk.
#include <GL/freeglut.h>
#elif defined(GLUI_OPENGLUT)
// OpenGLUT does not yet work properly with GLUI
// - use at your own risk.
#include <GL/openglut.h>
#else
#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include "../../freeglut/GL/glut.h"
//#include <GL/glut.h>
#endif
#endif
I can confirm that the __APPLE__ specific block is being used, and is including a version of glut that does not support glutLeaveMainLoop() (probably from /System/Library/Frameworks/GLUT.framework/).
** Edit ** I was able to get this to compile by replacing
Code:
#include <GLUT/glut.h>
with
Code:
#include "../../freeglut/GL/glut.h"
Once that was done the process was unable to locate GL/gl.h and GL/glu.h
Not being very familiar w/ cmake, I ultimately added the following to Box2D/CMakeLists.txt (/usr/X11/include are where my GL/gl.h and GL/glu.h are)
Code:
INCLUDE_DIRECTORIES("/usr/X11/include")
I'm sure there is a more elegant way to go about this, but I thought I should let you know.
Rick