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 8 of 8

Thread: GL/gl.h :no directory or file

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Riverside, CA, USA
    Posts
    18

    GL/gl.h :no directory or file

    hi,

    i can't seem to compile my program under linux mandrake 7.0

    gcc -o -L/usr/X11R6/lib -lGL -lGLU file.c

    it says:

    GL/gl.h : No directory or file found
    GL/glu.h : No directory or file found

    so how do i now if i have these file intall? if i do not have it, which *.rpm i need to intall from Mandrake linux 7.0?

    thank you.

  2. #2
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: GL/gl.h :no directory or file

    To see if the file is installed or not, try:

    locate gl.h


    If nothing comes back, you need to install XFree86-devel and Mesa-common-devel

    Hope this helps.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Riverside, CA, USA
    Posts
    18

    Re: GL/gl.h :no directory or file

    hi i did locate gl.h and nothing comes back. so i reinstall XFree86-devel and Mesa-common-devel and it still says the same thing. GL/gl.h ad GL/glu.h : no suck directory or file.

    manually i found the file gl.h and glu.h at /usr/X11R6/include/GL/ so why isn't it finding those files? do i need to specify something in the PATH? thanks.

  4. #4
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: GL/gl.h :no directory or file

    In that case add -I/usr/X11R6/include to your command line to GCC.

    Cheers.

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Riverside, CA, USA
    Posts
    18

    Re: GL/gl.h :no directory or file

    hi,

    ok. now when i type gcc -o -I/usr/X11R6/include/ -lGL -lGLU -lglut file.c it gave me the following error message:

    /usr/bin/ld : cannot find -lGL
    collect2: ld return exit status

    so how do i fix this? thanks.

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2001
    Posts
    8

    Re: GL/gl.h :no directory or file

    Originally posted by caophong:
    hi,

    ok. now when i type gcc -o -I/usr/X11R6/include/ -lGL -lGLU -lglut file.c it gave me the following error message:

    /usr/bin/ld : cannot find -lGL
    collect2: ld return exit status

    so how do i fix this? thanks.
    um...did you remove the -L... path that you had in your above post? and if you didn't, then locate where libGL<bla>.so/a libraries are and just give gcc -Lpathname to it...
    or you might want to make a sym link to the gl directories from the well known include/lib directories.

    good luck

  7. #7
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    418

    Re: GL/gl.h :no directory or file

    Originally posted by caophong:
    hi,

    ok. now when i type gcc -o -I/usr/X11R6/include/ -lGL -lGLU -lglut file.c
    I said "add", not "replace -L by -I".

    gcc -o myprogram -I/usr/X11R6/include/ file.c -L/usr/X11R6/include -lGL -lGLU -lglut.

  8. #8
    Junior Member Newbie
    Join Date
    Apr 2001
    Location
    Riverside, CA, USA
    Posts
    18

    Re: GL/gl.h :no directory or file

    wooohoooo it works thank you. just have to change


    gcc -o myprogram -I/usr/X11R6/include/ file.c -L/usr/X11R6/lib -lGL -lGLU -lglut.

Posting Permissions

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