Installing Qt on linux, cannot find -lGL Installing Qt on linux, cannot find -lGL linux linux

Installing Qt on linux, cannot find -lGL


Well it is trying to link with libgl and doesn't find it. You should install libgl-dev.

-l is a linker option, it tells the linker to use a certain library.For example you can have -lmagic meaning that you want to use libmagic.

Normally all libraries are called libsomething, and on debian you will find 3 packages called:libsomethinglibsomething-dbglibsomething-dev

The 1st one is the library, the second one is the library compiled with the debug symbols, so you can make sense of stacktraces more easily, and the final one is the development package, it contains the .h files so you can link to the library.


sudo apt-get install libgl-dev


On Fedora 17, I did:

sudo yum install mesa-libGL-devel