how to compile fox-toolkit with glx.h in mac osx

2.5k views Asked by At

I am trying to build Fox-toolkit with opengl support in Mac OSX mountain lion (10.8). I have modified the configure file from

GL/gl.h GL/glu.h

To

OpenGL/gl.h OpenGL/glu.h

and it can find those two files during the configure. However it cannot find glx.h with none of GL/glx.h, OpenGL/glx.h and GLUT/glx.h

I have XQuartz installed with proper linking. I can see glx.h at /opt/X11/include/GL/glx.h, but the fox-toolkit ./configure cannot find it. How to solve this problem?

2

There are 2 answers

0
Morison On

After long search and try, finally I have found the solution to this problem at sourceforge

According to Anders F Björklund (many thanks to him) in the post above-

For 10.7 Lion and beyond, the commands are-

CXXCPP="g++ -E" CXX="g++ -arch i386 -arch x86_64" CPPFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2" LDFLAGS="-L/usr/X11/lib" ./configure --with-x --with-xft --with-opengl --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib make make install

0
datenwolf On

GLX is the OpenGL extension protocol extension for X11. While MacOS X has a X11 server, it's OpenGL support it not so good. You certainly want to use MacOS X native OpenGL framework. Which means: No GLX!

I don't know Fox toolkit very well, but it might be (somebody shed some light on this please), that it doesn't contain support for OpenGL widgets on MacOS X yet.