c++ - Qt : Error while compiling Qt 5.0.1 on Windows, Visual Studio 2010 (VS2010)

标签 c++ visual-studio-2010 qt compiler-errors qmake

我正在尝试在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/

相关文章:

c++ - Linux 上后台 Qt 线程中的非阻塞读取导致 EAGAIN

qt - 选择后 ComboBox QML 不显示项目文本

c++ - FFmpeg 潜在的内存泄漏行为点。有这样的吗?

c++ - 使用递归模板动态分配多维数组

c++ - vc++ 2010 文档生成器

c++ - 如何通知父 CDialog 子 CWnd 已更新,以便另一个子控件可以响应更新?

Qt/C++ 事件循环异常处理

C++ Vector 实现分配新对象

c++ - 使用 C++ 使用 Qt 制作我自己的照片马赛克应用程序

c++ - fstream 文件为空(简单的小代码)