Results 1 to 8 of 8

Thread: /usr/bin/ld: cannot find -lGL

  1. #1
    Join Date
    May 2010
    Beans
    8

    /usr/bin/ld: cannot find -lGL

    hey guys,

    When i compile a set of examples i downloaded i get this error:

    /usr/bin/ld: cannot find -lGL

    i think i have opengl lib installed but i cant seem to correct this error...

    Any sugestions?

    Thanks.

  2. #2
    Join Date
    May 2010
    Beans
    8

    Re: /usr/bin/ld: cannot find -lGL

    Ok, just solved this.

    The linkage was broken...

    just found the library and associated the right files:

    ln -s /usr/lib/libGL.so.xx.xx.xx /usr/lib/libGL.so

    make sure you remove the broken libGL.so before running the command.

  3. #3
    Join Date
    Mar 2009
    Location
    MA
    Beans
    6
    Distro
    Ubuntu Development Release

    Re: /usr/bin/ld: cannot find -lGL

    also in thread 409438

    I had to remove the symlink (originally to mesa/libGL.so) and make a new one.

  4. #4
    Join Date
    Aug 2011
    Beans
    13

    Re: /usr/bin/ld: cannot find -lGL

    hi
    i have the same problem

    gcc main.o libk8055.o -o k8055 -lusb -L/usr/lib -lm
    /usr/bin/ld: cannot find -lusb
    so i check in /usr/lib, i see the lib libusb-1.0.so.0.0.0
    so i tape
    sudo ln -s /usr/lib/libusb-1.0.so.0.0.0 /usr/lib/libusb-1.0.so
    the link libusb-1.0.so is created in /usr/lib (i right-click to check its properties, the target is /usr/lib/libusb-1.0.so.0.0.0)
    but the problem is still there: "/usr/bin/ld: cannot find -lusb"
    false alert: i remove the number : sudo ln -s /usr/lib/libusb-1.0.so.0.0.0 /usr/lib/libusb.so
    it's ok now
    Last edited by moijdikssekool; August 24th, 2011 at 02:36 PM.

  5. #5
    Join Date
    Sep 2006
    Beans
    112

    Re: /usr/bin/ld: cannot find -lGL

    I'm facing a similar issue. From what I have learned, one needs to create a symbolic link. I need a little help understanding this please. WHile compiling a package I get this error
    Code:
    /usr/bin/ld cannot find -lcr
    So I search for libcr in my root directory. There is a lot of stuff in the output. I don't see something like libcr.so though. There are a lot of libcr0 variants, however. Can someone guide me as to what to put in the link, and where to save it in a newbie friendly manner? Here is what I find in the search:
    Code:
    /usr/src/blcr-0.8.2/tests/crut_util_libcr.c
    /var/lib/dkms/blcr/0.8.2/build/tests/crut_util_libcr.c
    /usr/src/blcr-0.8.2/libcr
    /var/lib/dkms/blcr/0.8.2/build/libcr
    /usr/share/doc/libcr0
    /var/cache/apt/archives/libcr0_0.8.2-15ubuntu1_amd64.deb
    /var/lib/dpkg/info/libcr0.list
    /var/lib/dpkg/info/libcr0.md5sums
    /var/lib/dpkg/info/libcr0.postinst
    /var/lib/dpkg/info/libcr0.postrm
    /var/lib/dpkg/info/libcr0.shlibs
    /var/lib/dpkg/info/libcr0.symbols
    /usr/lib/sasl2/libcrammd5.a
    /usr/lib/sasl2/libcrammd5.la
    /usr/lib/sasl2/libcrammd5.so
    /usr/lib/sasl2/libcrammd5.so.2
    /usr/lib/sasl2/libcrammd5.so.2.0.23
    /usr/src/linux-headers-2.6.38-11-generic/include/config/libcrc32c.h
    /usr/src/linux-headers-2.6.38-8-generic/include/config/libcrc32c.h
    /lib/modules/2.6.32-25-generic/kernel/lib/libcrc32c.ko
    /lib/modules/2.6.35-28-generic/kernel/lib/libcrc32c.ko
    /lib/modules/2.6.38-11-generic/kernel/lib/libcrc32c.ko
    /lib/modules/2.6.38-8-generic/kernel/lib/libcrc32c.ko
    /usr/src/blcr-0.8.2/include/libcr.h
    /var/lib/dkms/blcr/0.8.2/build/include/libcr.h
    /usr/lib32/libcroco-0.6.so
    /usr/lib/libcroco-0.6.so.3
    /usr/lib32/libcroco-0.6.so.3
    /usr/lib/libcroco-0.6.so.3.0.1
    /usr/lib32/libcroco-0.6.so.3.0.1
    /usr/share/doc/libcroco3
    /var/lib/dpkg/info/libcroco3.list
    /var/lib/dpkg/info/libcroco3.md5sums
    /var/lib/dpkg/info/libcroco3.postinst
    /var/lib/dpkg/info/libcroco3.postrm
    /var/lib/dpkg/info/libcroco3.shlibs
    /usr/lib/libcr_omit.so.0
    /usr/lib/libcr_omit.so.0.5.2
    /usr/lib/vlc/plugins/video_filter/libcroppadd_plugin.so
    /usr/lib/vlc/plugins/video_filter/libcrop_plugin.so
    /usr/lib/libcr_run.so.0
    /usr/lib/libcr_run.so.0.5.2
    /usr/lib/libcr.so.0
    /usr/lib/libcr.so.0.5.2
    /usr/lib/gtk-2.0/2.10.0/engines/libcrux-engine.so
    /usr/lib32/gtk-2.0/2.10.0/engines/libcrux-engine.so
    /lib/x86_64-linux-gnu/libcrypt-2.13.so
    /lib32/libcrypt-2.13.so
    /usr/lib/x86_64-linux-gnu/libcrypt.a
    /lib32/libcrypto.so
    /lib/libcrypto.so.0.9.8
    /lib32/libcrypto.so.0.9.8
    /usr/lib/libcrypto.so.0.9.8
    /usr/lib32/libcrypto.so.0.9.8
    /usr/share/doc/libcrypt-passwdmd5-perl
    /var/lib/dpkg/info/libcrypt-passwdmd5-perl.list
    /var/lib/dpkg/info/libcrypt-passwdmd5-perl.md5sums
    /usr/lib/x86_64-linux-gnu/libcrypt.so
    /lib/x86_64-linux-gnu/libcrypt.so.1
    /lib32/libcrypt.so.1
    /usr/share/doc/libcryptui0
    /var/lib/dpkg/info/libcryptui0.list
    /var/lib/dpkg/info/libcryptui0.md5sums
    /var/lib/dpkg/info/libcryptui0.postinst
    /var/lib/dpkg/info/libcryptui0.postrm
    /var/lib/dpkg/info/libcryptui0.shlibs
    /usr/lib/libcryptui.so.0
    /usr/lib/libcryptui.so.0.0.0

  6. #6
    Join Date
    Sep 2009
    Beans
    1,293

    Re: /usr/bin/ld: cannot find -lGL

    Manual linking is not usually required, usually its a sign of something broken if nothing else. In general,

    *
    Code:
    /usr/bin/ld cannot find -lcr
    Ok, so it cant find libcr.so, these /usr/lib/libsomelib.so are usually symlinks to actual libraries set up by -dev packages specifically for developers

    * Lets use apt-file to find what package we need
    Code:
    $ sudo apt-file update
    $ apt-file search libcr.so
    lib32cr0: /usr/lib32/libcr.so.0
    lib32cr0: /usr/lib32/libcr.so.0.5.2
    libcr-dbg: /usr/lib/debug/usr/lib/libcr.so.0.5.2
    libcr-dbg: /usr/lib/debug/usr/lib32/libcr.so.0.5.2
    libcr-dev: /usr/lib/libcr.so
    libcr0: /usr/lib/libcr.so.0
    libcr0: /usr/lib/libcr.so.0.5.2
    * So the libcr-dev package is the one we want
    Code:
    $ sudo apt-get install libcr-dev
    $ ls -l /usr/lib/libcr.so
    lrwxrwxrwx 1 root root 14 Dec 15  2010 /usr/lib/libcr.so -> libcr.so.0.5.2
    Usually that sort of method will find what package you want

  7. #7
    Join Date
    Sep 2009
    Beans
    1,293

    Re: /usr/bin/ld: cannot find -lGL

    p.s Its best to open a new thread rather than re-awaken an old similar one

  8. #8
    Join Date
    Sep 2006
    Beans
    112

    Re: /usr/bin/ld: cannot find -lGL

    Great. That helped. Thanks!!

Bookmarks

Posting Permissions

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