测试QT测试项目时出错

时间:2013-03-23 06:11:36

标签: qt makefile qmake kubuntu

我已开始在Kubuntu上使用QT。我首先通过Package Manager安装了g ++。然后我安装了QT 5.0.1。然后,我做了一个测试项目来检查一切是否正确。然后我遇到了以下问题。 - 找不到-lGL - collect2:错误:Id返回1退出状态

我在编译输出中看到了

11:32:05: Running steps for project untitled2...
11:32:05: Configuration unchanged, skipping qmake step.
11:32:05: Starting: "/usr/bin/make" -w
make: Entering directory `/home/harsh/Desktop/untitled2-build-Desktop_Qt_5_0_1_GCC_64bit-Debug'
g++ -m64 -Wl,-rpath,/home/harsh/Qt5.0.1/5.0.1/gcc_64 -Wl,-rpath,/home/harsh/Qt5.0.1/5.0.1/gcc_64/lib -o untitled2 main.o mainwindow.o moc_mainwindow. -L/usr/X11R6/lib64 -L/home/harsh/Qt5.0.1/5.0.1/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread 
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [untitled2] Error 1
make: Leaving directory `/home/harsh/Desktop/untitled2-build-Desktop_Qt_5_0_1_GCC_64bit-Debug'
11:32:05: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project untitled2 (kit: Desktop Qt 5.0.1 GCC 64bit)
When executing step 'Make'

请帮我解决这些错误。

1 个答案:

答案 0 :(得分:0)

Qt!= QT

错误告诉你出了什么问题,编译器找不到libGL.so。它通常位于/ usr / lib64。