我正在尝试在Visual Studio 2010(VS2010)下为Windows编译Qt 5.0.1,这是因为OpenGL的一个著名问题,其中OpenGL的唯一ES版本是Qt的预编译版本。
我在qeglplatformcontext_p.h遇到错误:
fatal error C1083: Cannot open include file 'EGL/egl.h': No such file or directory
但是,指定的文件和目录存在于qtbase \ src \ 3rdparty \ angle \ include中的Qt源的3rdparty文件中。
我正在使用的Qt是qt-everywhere-opensource-src-5.0.1.zip
我遵循的编译步骤是
1-解压缩D:\ Qt \ Qt5.0.1中的文件
2-打开Visual Studio命令提示符
3-在步骤1中提到的目录中运行以下命令:
set QMAKESPEC=win32-msvc2010
set QTDIR=D:\Qt\Qt5.0.1\qtbase
set PATH=%PATH%;D:\Qt\Qt5.0.1\qtbase\bin
configure -opensource -debug-and-release -developer-build -accessibility -opengl desktop -openvg -platform win32-msvc2010
..\jom\jom.exe -j 32
然后大约发生EGL/egl.h错误。 5分钟。
我应该怎么做才能解决这个编译错误?请指教。
我还有一个关于异常(exception)的问题。如何在此版本的Qt中启用异常(exception)?命令-exceptions或-no-exceptions不再有效。有任何想法吗?
感谢您的不懈努力。
最佳答案
我可以解决。我使用Git下载了存储库版本,然后使用以下命令运行了。可能没有必要从存储库下载它,但这是我到目前为止的工作(半小时以来仍在编译,没有错误)。
set QMAKESPEC=win32-msvc2010
set QTDIR=D:\Qt\Qt5.0.1
set PATH=D:\Qt\Qt5.0.1\bin;%PATH%
configure -debug-and-release -opensource -platform win32-msvc2010 -exceptions
C:\Qt\jom\jom.exe -j 32
默认情况下,它将包括OpenGL和其他库。不必明确定义它们。
祝大家好运 :)
关于c++ - Qt : Error while compiling Qt 5.0.1 on Windows, Visual Studio 2010 (VS2010),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14870272/