windows - 名为 Boxes 的 Qt 示例可在 Ubuntu 上运行,但不能在 Windows 上运行 (Qt 5.0.2)

标签 windows qt opengl ubuntu cross-platform

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

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

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

问题:

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

安装适用于 Windows 32 位的 Qt 5.0.2(VS 2010、OpenGL、476 MB)后

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

所以,我检查了“构建和运行选项”,它显示了 enter image description here

最佳答案

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

http://qt-project.org/downloads

寻找适用于 Windows 32 位的 Qt 5.0.2(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 - 名为 Boxes 的 Qt 示例可在 Ubuntu 上运行,但不能在 Windows 上运行 (Qt 5.0.2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16412542/

相关文章:

c++ - 如何为 native Windows(而不是 X Windows)编译 gtk+ 应用程序?

windows - CALL 命令与 START with/WAIT 选项

windows - 如何使用 SendKeys 使类型转换变量显示为键而不是值

c++ - 如何防止 GDB 加载(大型)库的调试符号?

c++ - 为什么我需要绑定(bind)姿势矩阵的逆来计算动画?

opengl - 是否可以在不先将整个纹理加载到常规 RAM 的情况下将纹理加载到 OpenGL 中?

windows - Windows 桌面锁定时 ExitWindowsEx 失败

python - 对象超出范围并在 PySide/PyQt 中被垃圾收集

c++ - 从 C++ (Qt5) 向 QML 项目发送信号

java - 转换后获取对象在 opengl 中的位置