- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经在运行 ubuntu 12.04 的 amd 机器上安装了 QT5,它也带有 QT creator。如果重要的话,我的图形驱动程序是 radeon r9270x。
当我尝试编译一个基本的“hello world”类型的 Qt 程序时,我收到错误消息“找不到 -lGL”。我四处搜索(Qt: can't find -lGL error)它说使用“sudo apt-get install libgl1-mesa-dev”但是当我这样做时我已经安装了它。这里(Installing Qt on linux, cannot find -lGL)它说要安装“sudo apt-get install libgl-dev”,但这只会让我明白
"Reading package lists... Done Building dependency tree Reading state information... Done Package libgl-dev is a virtual package provided by: libgl1-mesa-swx11-dev 8.0.4-0ubuntu0.7
libgl1-mesa-dev-lts-trusty 10.1.3-0ubuntu0.1~precise1
libgl1-mesa-dev-lts-saucy 9.2.1-1ubuntu3~precise1
libgl1-mesa-dev-lts-raring 9.1.7-1ubuntu2~precise1
libgl1-mesa-dev-lts-quantal 9.0.3-0ubuntu0.4~precise1
libgl1-mesa-dev 8.0.4-0ubuntu0.7 You should explicitly select one to install.E: Package 'libgl-dev' has no installation candidate"
我用过的各种其他资源都说可以做类似的事情,但我仍然遇到此错误。有任何想法吗?另一方面,不知道相关性,我无法让 QT Creator 启动最长时间。它总是会出现故障和核心转储。我终于更新了我的 amd catylist 控制中心/视频驱动程序并解决了这个问题。
这是 qt creator 的编译输出:
02:34:21: Running steps for project myHelloWorld... 02:34:21: Configuration unchanged, skipping qmake step. 02:34:21: Starting: "/usr/bin/make" g++ -Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64 -Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -o myHelloWorld main.o
-L/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make: *** [myHelloWorld] Error 1 02:34:21: The process "/usr/bin/make" exited with code 2. Error while building/deploying project myHelloWorld (kit: Desktop Qt 5.3 GCC 64bit) When executing step "Make" 02:34:21: Elapsed time: 00:00.
最佳答案
尝试运行它,重新启动 Qt creator 并尝试干净的构建。
sudo apt-get install mesa-common-dev
编辑:可能是您只是错过了 Mesa 包。查看列出的 XCB 依赖项 here并安装缺少的东西。
我在另一个案例中也看到过这个错误,但我不记得那里的解决方案了。我想我已经通过安装“libglu1-mesa-dev”包解决了这个问题。
sudo apt-get install libglu1-mesa-dev -y
但我不完全确定这是否已经解决了问题,或者我必须安装其他任何东西。
关于linux - Qt Creator 编译错误 "cannot find -lGL"。其他解决方案不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26436890/
我正在尝试将 Parcelable 数据从一个 Intent 传递到另一个 Intent ,这是我得到的错误: 08-31 14:12:22.709: E/AndroidRuntime(9931):
我收到错误消息“Parcelable 协议(protocol)需要一个在类上名为 CREATOR 的 Parcelable.Creator 对象......”,但我确实有一个 Creator,但我不知
我喜欢 Qt Creator 中的深色“FakeVim”配色方案。然而,它只会使编辑器部分变暗,而其他一切都保持正常,这有点令人不安。有没有办法让 Qt Creator 全局使用这种黑暗方案? Vim
Qt Creator 中是否可以有构建后事件(如在 VC++ 中)?特别是,我想在构建可执行文件后将其复制到另一个文件夹。可以吗? 最佳答案 添加执行脚本以复制文件作为构建步骤,如下所示, 关于qt-
有没有办法在 Qt Creator 中获取打开文档的列表。 有时当 Qt Creator 崩溃并且在重新打开时无法恢复 session 时,在它崩溃之前有一个打开的文件列表会很方便。 最佳答案 不确定
Qt 似乎不像其他 IDE 通常那样在文件夹中构建文件,例如 netbeans 将头文件放在头文件夹中,将源文件放在源文件夹中等等。我已经看到这是在 Qt 中完成的,但我不知道为什么它不在我的电脑上。
我正在尝试创建一个 2 的上标,以显示用户在我的对话框中提供的字段之后的单位标签的平方。我在 Windows 上使用 Qt Creator v2.0.1。 QLabel 有一个文本字段和一个 text
我正在尝试更改 QT Creator 中的构建输出目录(即,我想输出到 ../../bin/debug 而不是输出到 ./debug)。我尝试通过项目模式编辑构建输出目录,但它是只读的。查看 .pro
如何在 QT Creator 中仅编译项目中的一个文件。 有快捷键吗? 例如,在 VS 中,您可以按 Ctrl F7 并编译当前的 cpp 文件。 最佳答案 现在可以做到这一点,至少是 Qt Crea
使用 Qt Creator 的 Memcheck 功能返回以下内容: valgrind: Bad option: --xml=yes, but no XML destination specified
我通常使用带有 cmake 的 Qt creator 来编程 C++ 项目。最近我读了很多关于介子的书,它很简单,我喜欢测试它。 This示例解释了如何设置介子。 在使用介子时,我仍然喜欢使用 Qt
我刚刚在我的机器上构建并安装了 QtQuick3D。我运行示例项目“立方体”。 它有效,我可以构建和执行它。它向我展示了一个可以用鼠标旋转的立方体。但是在 QML 编辑器中,我在所有 Viewport
作为一名已转向 Linux 的老 Borland C++ Bulder 程序员,我很高兴找到 QT 和 QT Creator。 但是我遇到了第一个障碍:我设计了一个带有一些控件的表单,并添加了一个菜单
Visual Assist X 为 Visual Studio 提供了一个很好的功能,称为 column indicator 。它在文本编辑器中的指定列上显示一条垂直线(我使用第 80 列)。这可以帮
这看起来应该很简单,但似乎没有一种方法可以像人们期望的那样做到这一点。 我在 qt Creator 中打开了两个单独的 C++ 项目,我想针对另一个项目中的一个项目进行包含/编译。 这是我的布局: p
问题: Qt Creator 是用 Qt Creator 构建的吗? 同样,Qt Designer 是用 Qt Designer 构建的吗? 顺便说一句,为什么有两个 Qt IDE?他们是竞争对手吗?
我坐在带有 Qt Creator v2.7 的 Ubuntu 12.04(也尝试过新版本,2.8 测试版)中,当我创建一个非 Qt 项目/普通 C++ 项目(CMake Build)时,一切似乎都很好
这个问题在这里已经有了答案: 10年前关闭。 Possible Duplicate: How to get Qt Creator to work with CDB? 我正在尝试将 Cdb 与 Qt C
Qt Creator 通常将注释着色为绿色,但我在 Qt 示例中看到了蓝色注释,而且 Qt Creator 似乎将所有以 //! 开头的注释着色为蓝色。 这是一个示例屏幕截图: 这是某种约定吗?蓝色代
我刚刚从英语下载站点http://qt.nokia.com/downloads上,在我的英语Windows 7系统上下载并安装了Qt Creator 1.3.1,显然,尽管帮助文件是英语,但Qt Cr
我是一名优秀的程序员,十分优秀!