View Full Version : how to omit GLEE from linux version of OpenGL app

08-24-2008, 12:08 PM
I have an OpenGL2 application that runs on linux and win32 by including glee.h and glee.c in my program. I believe glee is necessary on win32, but I do not understand why glee.h and glee.c are necessary in linux.

When I omit glee.h and glee.c from my project in linux, it compiles okay, but generates hundreds of link errors due to undefined symbols. The symbols have an extra p prefix character (like "pglActiveTexture" for function "glActiveTexture").

The gl.h glx.h glext.h glxext.h files apparently contain every GLX and OpenGL function (up to GLX 1.3 and OpenGL 2.1), which is why it compiles okay. Do I need to refer to another library in the linker properties (in addition to GL and X11)?

I believe I am missing something very obvious! Tell me so I can slap my forehead and move on. Thanks.

In case it matters, my linux is ubuntu 8.04.1 LTS, and my graphics card is nvidia 8600GT (until my GTX280 arrives).

08-24-2008, 12:11 PM
You still need Glee in Linux. Only entrypoints up to 1.2 are exposed natively.

08-24-2008, 01:48 PM
On linux, your API is GL2-compliant and your ABI (http://en.wikipedia.org/wiki/Application_binary_interface) is GL1.2-compliant.

08-24-2008, 10:46 PM
I bypass the extension loader. It makes everything non-portable though. If you want to do it, try
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glu.h>

links with (ldd -r)
libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x00007f50727d8000)
libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0x00007f507a37a000)