【问题标题】:Error while testing QT test project测试 QT 测试项目时出错
【发布时间】:2013-03-23 06:11:35
【问题描述】:

我已经开始在 Kubuntu 上使用 QT。我首先通过包管理器安装了 g++。然后我安装了 QT 5.0.1。然后我做了一个测试项目来检查一切是否正确。然后我遇到了以下问题。 - 找不到 -lGL - collect2: error: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'

请帮我修复这些错误。

【问题讨论】:

    标签: qt makefile qmake kubuntu


    【解决方案1】:

    Qt != QT

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-12
      • 2015-01-28
      • 2011-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多