Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: Opengl - linux development

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    4

    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

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    4

    Re: Opengl - linux development

    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

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2002
    Location
    Portugal
    Posts
    11

    Re: Opengl - linux development

    Libraries must be found at:
    1) compile time;
    2) link time;
    3) run time;

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

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

    3) you can:
    i) add /blabla/blabla/lib to /etc/ld.so.conf 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.

  4. #4
    Guest

    Re: Opengl - linux development

    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!!

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    4

    Re: Opengl - linux development

    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

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: Opengl - linux development

    hello

    sorry, you may attend something else...

    Are you tin weasel the mandrake expert ?

  7. #7
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    4

    Re: Opengl - linux development

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •