Opengl - linux development

hello… i’m running Mandrake 8.1 on a DELL Inspiron8000, and am trying to compile a simple OpenGL app (using SDL) however, on compilation i get errors stating none of the gl functions are defined. i can’t find the gl.h files anywhere… i installed MESA4.0, still no luck… what files am i missing (if any) and what #includes for the GL libraries should be in the code?

thanks in advance

sorry, just as i posted it, i noticed i did have the header files in /usr/X11R6/include/GL/gl.h

but somehow on the gcc command, they aren;t picked up. i assume it’s a #inlcude error? or a incorrect./missing path setting…

again… thanks

Libraries must be found at:

  1. compile time;

  2. link time;

  3. run time;

  4. you must have something as -I/blabla/blabla/include in your compile directive.

  5. you must have something as -L/blabla/blabla/lib
    in your link directive.

  6. you can:
    i) add /blabla/blabla/lib to /etc/ and then run (as root) /sbin/ldconfig
    ii) add /blabla/blabla/lib to the path of LD_LIBRARY_PATH. This is an environment variable usually defined in .bash_profile, for each user.
    iii) make a symbolic link to /usr/lib or /usr/local/lib (better), for example, a place where the system will try to find the libraries.
    iv) use ldd: ldd executable<Return> will tell you the libraries and paths that the executable needs to run.

Can you write, what is the best way, to compile a program with the libs included (at compile and link time)? I try and try and try, but it won`t compile. If you can post an example, it would be great. Can I compile a programm with the GLX Extensions, or do i have to rewrite my programm with GLX Instructions???


thanks to all… with some help and looking around i found that i needed this to compile it successfully

gcc -o output file.cpp file1.cpp -L/usr/X11R6/include -lSDL -lGL -lGLU

hope that can help others to…

thanks again


sorry, you may attend something else…

Are you tin weasel the mandrake expert ?

nah… but i wish i was… however, i do run mandrake… must be a weasel thing

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