9

我正在按照本教程在 Windows 上编译 Qt 5,使用 Visual Studio 2008 作为编译器。

跑步时configure.bat我收到警告-The build will most likely fail.

这是完整的命令:

configure -developer-build -opensource -nomake examples -nomake tests

这是 configure.bat 输出的摘录:

Running configuration tests...
WARNING: The DirectX SDK could not be detected:
  There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is
not set.
Disabling the ANGLE backend.

WARNING: Using OpenGL ES 2.0 without ANGLE.
Specify -opengl desktop to use Open GL.
The build will most likely fail.

我应该怎么做才能避免这个警告?我应该指定-opengl,还是应该安装 Direct X SDK?

编辑

构建(我运行nmake)确实失败了,抱怨GLES2/gl2.h缺少:

c:\workspace\qt5source\qt5\qtbase\include\qtgui\../../src/gui/opengl/qopengl.h(82) : fatal error C1083: Cannot open include file: 'GLES2/gl2.h': No such file or directory
4

1 回答 1

13

OpenGL ES is a cut down version of the OpenGL specification aimed at smartphones and tablets, ANGLE provides the ability for OpenGL ES API calls to be converted to DirectX equivalents.

Unless you plan on creating apps that target OpenGL ES platforms and Windows, just go with passing -opengl desktop to configure. Otherwise you will need to get hold of the DirectX SDK to enable ANGLE support.

于 2013-05-20T13:16:30.823 回答