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

Thread: Linking Error in Ubuntu 10.04

  1. #1
    Junior Member Newbie
    Join Date
    May 2011
    Posts
    3

    Linking Error in Ubuntu 10.04

    Hi Everyone,
    I am struggling with a linking problem. I am trying to rebuild an app in linux which used to work fine in windows. I am linking it against libGL, libGLU and libGLEW but it keeps saying:

    cannot find -llibglut VideoGallery

    I checked the paths with ldconfig tool:

    ldconfig -v | grep GL
    /sbin/ldconfig.real: Can't stat /lib/i486-linux-gnu: No such file or directory
    /sbin/ldconfig.real: Can't stat /lib64: No such file or directory
    /sbin/ldconfig.real: Can't stat /usr/lib64: No such file or directory
    /sbin/ldconfig.real: Cannot stat /usr/lib/mesa/libGL.so: No such file or directory
    libGLU.so.1 -> libGLU.so.1.3.070701
    libGLEW.so.1.5 -> libGLEW.so.1.5.2
    libGL.so.1 -> libGL.so.270.41.19


    I have installed all libs and I am using NVIDIA driver on this machine.

    Please help. Thanks

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Linking Error in Ubuntu 10.04

    On debian/ubuntu, make sure to install freeglut-dev.
    Or red-hat/fedora, sudo yum install freeglut-dev.
    Then it should be -lglut and not -llibglut.

  3. #3
    Junior Member Newbie
    Join Date
    May 2011
    Posts
    3

    Re: Linking Error in Ubuntu 10.04

    Thanks ZBuffer, But How about GL, GLU, GLUT and GLEW?


    I still receive error:

    make all
    Building target: OpenGLTest
    Invoking: GCC C++ Linker
    g++ -L/usr/lib -o"OpenGLTest" ./src/OpenGLTest.o -lGL -lGLU -lglut
    /usr/bin/ld: cannot find -lGL
    collect2: ld returned 1 exit status

  4. #4
    Junior Member Newbie
    Join Date
    May 2011
    Posts
    3

    Re: Linking Error in Ubuntu 10.04

    Fixed it. The libs were: glut, GLU, GLEW, ftgl that I used.
    Apparently no GL is needed.

    Thanks

Posting Permissions

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