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

Thread: error lGL on SUSE

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

    error lGL on SUSE

    Hi, I am running SUSE 11.3, I recently installed all the packages of OpegGL using Yast.

    When I try compiling a file, with this code:
    gcc -o file file.cpp -lglut -lGL -lGLU
    I read this error:
    gcc: lGL No such file or directory.

    This error don't appear on other machines.
    I've probably done something wrong in the installation.

    can someone help me?


    Thanks.
    Eeepc 1005HA: Suse GNOME 11.3 + Seven

  2. #2
    Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    466

    Re: error lGL on SUSE

    maybe gl is not installed in the default lib directory path, try to add -L /usr/X11R6/lib in your command line.
    If still don't work, try to check where gl libraries are installed and modify the -L in accordance.

  3. #3
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,891

    Re: error lGL on SUSE

    Quote Originally Posted by dedo89
    Hi, I am running SUSE 11.3, I recently installed all the packages of OpegGL using Yast.

    When I try compiling a file, with this code:
    gcc -o file file.cpp -lglut -lGL -lGLU
    I read this error:
    gcc: lGL No such file or directory.

    This error don't appear on other machines.
    I've probably done something wrong in the installation.

    can someone help me?
    You're in luck. I'm sitting on an SuSE 11.3 box right now, with the NVidia OpenGL drivers installed, and I find:

    Code :
    > ls -l /usr/lib64/libGL.so* /usr/lib/libGL.so*
    lrwxrwxrwx 1 root root     10 Oct 29 08:35 /usr/lib/libGL.so -> libGL.so.1
    lrwxrwxrwx 1 root root     18 Oct 29 08:35 /usr/lib/libGL.so.1 -> libGL.so.260.19.14
    -rwxr-xr-x 1 root root 757412 Oct 29 08:35 /usr/lib/libGL.so.260.19.14
    lrwxrwxrwx 1 root root     10 Oct 29 08:35 /usr/lib64/libGL.so -> libGL.so.1
    lrwxrwxrwx 1 root root     18 Oct 29 08:35 /usr/lib64/libGL.so.1 -> libGL.so.260.19.14
    -rwxr-xr-x 1 root root 980368 Oct 29 08:35 /usr/lib64/libGL.so.260.19.14

    /usr/lib64 is for 64-bit libs. /usr/lib is for 32-bit libs.

    When you specify -lGL on the link line, that tells GCC to go searching the system library directories for a file named libGL.so. As you can see, it finds it in /usr/lib64 directory (for a 64-bit build). And that daisy chains to libGL.so.1 and onto libGL.so.260.19.14, which is the actual library file.

    Also, if you don't have a vendor-specific GL driver installed, looks like the "Mesa" package is what provides the libGL.so symlink:

    Code :
    > rpm -qf /usr/lib64/libGL.so
    Mesa-7.8.2-1.3.x86_64

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2010
    Posts
    4

    Re: error lGL on SUSE

    Quote Originally Posted by _arts_
    maybe gl is not installed in the default lib directory path, try to add -L /usr/X11R6/lib in your command line.
    The dir. /usr/X11R6/lib is empty!


    Quote Originally Posted by Dark Photon
    You're in luck. I'm sitting on an SuSE 11.3 box right now, with the NVidia OpenGL drivers installed, and I find:
    Oh Good!!I'm studying programming OpenGL on my Asus EEE

    Quote Originally Posted by Dark Photon
    Code :
    > ls -l /usr/lib64/libGL.so* /usr/lib/libGL.so*
    lrwxrwxrwx 1 root root     10 Oct 29 08:35 /usr/lib/libGL.so -> libGL.so.1
    lrwxrwxrwx 1 root root     18 Oct 29 08:35 /usr/lib/libGL.so.1 -> libGL.so.260.19.14
    -rwxr-xr-x 1 root root 757412 Oct 29 08:35 /usr/lib/libGL.so.260.19.14
    lrwxrwxrwx 1 root root     10 Oct 29 08:35 /usr/lib64/libGL.so -> libGL.so.1
    lrwxrwxrwx 1 root root     18 Oct 29 08:35 /usr/lib64/libGL.so.1 -> libGL.so.260.19.14
    -rwxr-xr-x 1 root root 980368 Oct 29 08:35 /usr/lib64/libGL.so.260.19.14

    /usr/lib64 is for 64-bit libs. /usr/lib is for 32-bit libs.

    When you specify -lGL on the link line, that tells GCC to go searching the system library directories for a file named libGL.so. As you can see, it finds it in /usr/lib64 directory (for a 64-bit build). And that daisy chains to libGL.so.1 and onto libGL.so.260.19.14, which is the actual library file.

    Also, if you don't have a vendor-specific GL driver installed, looks like the "Mesa" package is what provides the libGL.so symlink:

    Code :
    > rpm -qf /usr/lib64/libGL.so
    Mesa-7.8.2-1.3.x86_64
    I tried this:
    Code :
    > ls -l /usr/lib64/libGL.so* /usr/lib/libGL.so*
    ls: can not access /usr/lib64/libGL.so*: No such file or directory
    lrwxrwxrwx 1 root root     10  8 ago 19:30 /usr/lib/libGL.so -> libGL.so.1
    lrwxrwxrwx 1 root root     12  8 ago 19:29 /usr/lib/libGL.so.1 -> libGL.so.1.2
    -rwxr-xr-x 1 root root 404624  5 lug 15:19 /usr/lib/libGL.so.1.2
    > rpm -qf /usr/lib/libGL.so
    Mesa-7.8.2-1.3.i586
    Is it correct?

    Thanks for reply.
    Eeepc 1005HA: Suse GNOME 11.3 + Seven

  5. #5
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    2,891

    Re: error lGL on SUSE

    Quote Originally Posted by dedo89
    Is it correct?
    Looks good. Now your original error was:

    Code :
    gcc -o file file.cpp -lglut -lGL -lGLU
    I read this error:
    gcc: lGL No such file or directory.

    This error is not possible given the command you specified. So one or the other is wrong. "lGL No such file ..." would imply that you put -llGL on the link line. It should be -lGL. -l being the option and GL being the base library name (libGL.so being the full name).

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2010
    Posts
    4

    Re: error lGL on SUSE

    Quote Originally Posted by Dark Photon
    This error is not possible given the command you specified. So one or the other is wrong. "lGL No such file ..." would imply that you put -llGL on the link line. It should be -lGL. -l being the option and GL being the base library name (libGL.so being the full name).
    In fact the code i wrote was:
    Code :
    > gcc -o file file.cpp -lglut lGL -lGLU
    without "-"!!

    Sorry for the mistake!!!
    Thanks for the reply!
    Now everything works!!
    Eeepc 1005HA: Suse GNOME 11.3 + Seven

Posting Permissions

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