ubuntu 12.04 /usr/bin/ld: cannot find -lGL

#1

Hi, all,

I’m trying to compile some project on ubuntu 12.04 lowlatency kernel.
I’ve got install the amd drivers for my graphic card (AMD Radeon 6310) and I’ve got always this error when I do a make :

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

The card is ok, I have test with glxgears and it’s run

I’ve searched on google and this forum but anybody have the same error.

Is anyone with an idea ?

#2

have you ran the install_dependencies script?
https://github.com/openframeworks/openFrameworks/blob/master/scripts/linux/ubuntu/install-dependencies.sh

#3

Yes,

I’have just run the install_dependencies script a second time and I’ve got the same error.

I think it’s mayby a symlink error of -lGL because yesterday I ran the script for bulding all examples (just after install amd drivers)and I can today run the bin for all examples.

#4

Ok I’have find it was the libGl.so that was installed to another place.
I have done :

sudo ln -s /usr/lib/fglrx/libGL.so.1.2 /usr/lib/libGL.so

and now it’s ok.

#5

hm interesting. that may also be a solution to another problem I encountered, thank you. You haven’t changed the default paths, have you?

#6

No it’s just a link to indicate the placement of the libGl on my computer for every application that need it. There is nothing to change in OF.

#7

Yes I know. It’s just surprising that this link is needed in the first place, and I would like to find out why - the linker should find the library on its own. That’s why I asked if you maybe manually changed some paths, which could have been the explanation.

#8

try using the config.make, MakeFile and addons.make from example folder. It solves most of the problems by using the similar structure of the example folder