Error compiling project in QT Creator

2

I'm serious about studying programming and I chose the QT framework, when I was with a dualboot on my computer there was this problem that I'm having right now after removing the dualboot in> and install only Ubuntu 14.10.

In Ubuntu installed QT without problem and at the time of compiling the project QT Creator is giving me the error below. How do I solve this problem?

04:49:43: Running steps for project untitled1...
04:49:43: Starting: "/home/tandavala/Qt/5.3/gcc/bin/qmake" /home/tandavala/untitled1/untitled1.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
04:49:43: The process "/home/tandavala/Qt/5.3/gcc/bin/qmake" exited normally.
04:49:43: Starting: "/usr/bin/make" 
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../Qt/5.3/gcc/mkspecs/linux-g++ -I../untitled1 -I../Qt/5.3/gcc/include -I../Qt/5.3/gcc/include/QtQuick -I../Qt/5.3/gcc/include/QtQml -I../Qt/5.3/gcc/include/QtWidgets -I../Qt/5.3/gcc/include/QtNetwork -I../Qt/5.3/gcc/include/QtGui -I../Qt/5.3/gcc/include/QtCore -I. -I. -o main.o ../untitled1/main.cpp
/home/tandavala/Qt/5.3/gcc/bin/rcc -name qml ../untitled1/qml.qrc -o qrc_qml.cpp
g++ -c -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_QML_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../Qt/5.3/gcc/mkspecs/linux-g++ -I../untitled1 -I../Qt/5.3/gcc/include -I../Qt/5.3/gcc/include/QtQuick -I../Qt/5.3/gcc/include/QtQml -I../Qt/5.3/gcc/include/QtWidgets -I../Qt/5.3/gcc/include/QtNetwork -I../Qt/5.3/gcc/include/QtGui -I../Qt/5.3/gcc/include/QtCore -I. -I. -o qrc_qml.o qrc_qml.cpp
g++ -Wl,-rpath,/home/tandavala/Qt/5.3/gcc -Wl,-rpath,/home/tandavala/Qt/5.3/gcc/lib -o untitled1 main.o qrc_qml.o   -L/home/tandavala/Qt/5.3/gcc/lib -lQt5Quick -lQt5Qml -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:192: recipe for target 'untitled1' failed
make: *** [untitled1] Error 1
04:49:47: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled1 (kit: Desktop Qt 5.3 GCC 32bit)
When executing step "Make"
04:49:47: Elapsed time: 00:05.
    
asked by anonymous 27.11.2014 / 05:55

2 answers

2

Logic this and the problem friend, you know more with a bit of research I could solve so I was typing in the terminal sudo sudo apt-get install libqt4-dev and the problem will be solved.

    
27.11.2014 / 06:28
0

Your error is basically this:

/usr/bin/ld: cannot find -lGL

In this link , I found the following tip:

sudo apt-get install libglu1-mesa-dev -y

Another tip I found on this other link . Take a look at the /usr/lib folder and see if libGL.so is there. If it is, but with a different name, you can do this:

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

In a question in StackOverflow in English

a>, someone had the same problem as you and managed to solve. In his case, the libraries were in the /usr/lib/nvidia-current folder, so to solve, the accepted answer from there suggests something like this:

sudo ln -s /usr/lib/nvidia-current/libGL.so.1 /usr/lib/libGL.so.1
sudo ln -s /usr/lib32/nvidia-current/libGL.so.1 /usr/lib/libGL.so.1
sudo ln -s /usr/lib/nvidia-current/libGL.so /usr/lib/libGL.so
sudo ln -s /usr/lib32/nvidia-current/libGL.so /usr/lib/libGL.so

Maybe that will solve.

    
27.11.2014 / 06:30