1
votes

I'am currently on my first QtQuick 2.0 project, but everytime I build my project, I get the following error:

cannot find -lGL

That's all. I think it is the libglib library that is missing, but I could not figure out which package I have to install to solve this problem. The QtCreator runs on my Desktop with Debian Wheezy 64bit. I do not the error when building on my Laptop running LMDE 32bit.

EDIT: Finally I could collect some more information:

16:57:09: Starting "/usr/bin/make" 
g++ -Wl,-rpath,/opt/Qt5.1.0/5.1.0/gcc_64 -Wl,-rpath,/opt/Qt5.1.0/5.1.0/gcc_64/lib -Wl,-rpath-link,/opt/Qt5.1.0/5.1.0/gcc_64/lib -o Test main.o edgebutton.o edgetype.o qtquick2applicationviewer.o moc_qtquick2applicationviewer.o moc_edgebutton.o moc_edgetype.o   -L/opt/Qt5.1.0//5.1.0/gcc_64/lib -lQt5Quick -lQt5Declarative -lQt5Qml -lQt5Widgets -lQt5Network -lQt5Script -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [Bananarang] Error 1
16:57:09: The process "/usr/bin/make" terminated with return value 2.
Error while building/deploying of project Test(Kit: Desktop Qt 5.1.0 GCC 64bit)
During execution of step 'Make'
1

1 Answers

2
votes

It's not libglib. It's libGL. It's usually provided by mesa or by your GPU's vendor. Find which package provides libGL.so and install that one. Under Debian it should be called libgl1-mesa-dev.