【问题标题】:Qt example named Boxes working on Ubuntu but not on Windows (Qt 5.0.2)名为 Boxes 的 Qt 示例在 Ubuntu 上工作,但在 Windows 上不工作 (Qt 5.0.2)
【发布时间】:2013-05-07 06:27:54
【问题描述】:

我一直在寻找一个跨平台的 GUI 应用程序开发框架(用于构建 Linux、Android、Windows 应用程序和 OS X 的代码相同),我发现 Qt 最适合这个框架(受到启发,因为 VLC 媒体播放器是用 Qt 构建的)。

首先在 Ubuntu 中安装它,我在构建示例时遇到了一些问题,但我设法解决了它,并且 Qt 中给出的每个示例都运行良好。

但在 Windows 中,除了“Boxes”示例之外,每个示例都可以正常工作。

问题:

warning: Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c
error: This example requires Qt to be configured with -opengl desktop

安装 Qt 5.0.2 for Windows 32 位(VS 2010,OpenGL,476 MB)后

error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.

所以,我检查了构建和运行选项,它显示

【问题讨论】:

  • 您应该向 Qt 项目提交错误报告。

标签: windows qt opengl ubuntu cross-platform


【解决方案1】:

您需要使用 opengl 桌面选项构建 qt。

http://qt-project.org/downloads

寻找Qt 5.0.2 for Windows 32-bit (VS 2010, OpenGL, 476 MB)

http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-msvc2010_32_opengl-x86-offline.exe.mirrorlist

安装此 qt 版本后,您的示例应该可以工作

【讨论】:

  • 正如你所说,我为 Windows 32 位(VS 2010,OpenGL,476 MB)安装了 Qt 5.0.2,现在我得到了:-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
【解决方案2】:

安装后问题解决

  1. Microsoft Visual Studio 2010
  2. Qt 5.0.2 for Windows 32 位(VS 2010,OpenGL,476 MB)

但是,当我打开编译的 exe 文件时,单独运行 Qt 形式的程序可以工作,它显示 Qt5***.dll 丢失。

解决缺少的 dll :

Dependency Walker 中打开已编译的exe,它将显示所有丢失的dll。现在去 \Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin 在那里我们可以找到所有 Qt5***.dll 将其复制并粘贴到exe 位置。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-05
    • 1970-01-01
    • 1970-01-01
    • 2022-08-11
    • 2012-07-04
    相关资源
    最近更新 更多