PDA

View Full Version : [SOLVED] error: cannot find -lGL



lele71
13th December 2013, 13:13
Hello,
I tryed to install QT5.1.1 in Ubuntu 12.04 inside a virtual machine VMware.
If I create a new project or clean or rebuild an exist project, when i try to build i receive these error:

error: cannot find -lGL

In the file Makefile I find these row:

LIBS = $(SUBLIBS) -L/home/lele/Qt5.1.1/5.1.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread

if i delete manually -lGL everything work and compilation happen whitout errors, but i would like to dont need to modificate manually the file every time when i clea or rebuild my projects.

Somebody can tell me why happen these ?

Thanks for answere Gabriele.

Zlatomir
13th December 2013, 16:02
OpenGl is a requirement for Qt 5, so you will need to install it: sudo apt-get install mesa-common-dev

lele71
13th December 2013, 16:18
Thanks Zlatomir for advice I try it but for regred nothing changed the problem still persist.

Gabriele.

Zlatomir
13th December 2013, 17:25
Did the installation finished without problems?
Anyway try to install the libgl: sudo apt-get install libgl1-mesa-dev

lele71
13th December 2013, 17:40
Fantastic Zlatomir after install libgl everything work fine.

Many many thanks

Sincerely Gabriele

programtruck
7th April 2014, 10:46
install sudo apt-get install mesa-common-dev