How to omit GLEE from linux version of OpenGL app

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).

You still need Glee in Linux. Only entrypoints up to 1.2 are exposed natively.

On linux, your API is GL2-compliant and your ABI is GL1.2-compliant.

I bypass the extension loader. It makes everything non-portable though. If you want to do it, try
#define GL_GLEXT_PROTOTYPES 1
#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)

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.