使用Desktop OpenGL构建Qt时出错
Error when building Qt with Desktop OpenGL
我使用默认配置成功构建了Qt5.5.1:
configure -debug-and-release -opensource -platform win32-msvc2015
然后
nmake
由于此版本默认支持QtANGLE,因此我使用以下配置将Qt 5.5.1重建为目标Desktop OpenGL:
configure -debug-and-release -opensource -opengl desktop -platform win32-msvc2015
然后
nmake
但我有很多错误,这是输出:
Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -FIqt_gui_pch.h -Yuqt_gui_pch.h -Fp.pchdebugQt5Guid_pch.pch -nol
ogo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -D_HAS_EXCEPTIONS
=0 -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 /Fd....lib
Qt5Guid.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_NO_USING_NAMESPACE -DQT_BUILD_GUI_LIB
-DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_
ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPR
ECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_USE_BUNDLED_LIBPNG
-DPNG_ARM_NEON_OPT=0 -DQT_ENABLE_HARFBUZZ_NG -DQT_OPENGL_ES_2 -DQT_OPENGL_ES_2_A
NGLE -DQT_NO_EXCEPTIONS -DQT_CORE_LIB -I. -I....include -I....includeQtGui
-I....includeQtANGLE -I....includeQtGui5.5.1 -I....includeQtGui5.5.1
QtGui -Itmp -I..3rdpartylibpng -I..3rdpartyzlib -I..3rdpartyharfbuzz-ngin
clude -I..3rdpartyzlib -I....includeQtCore5.5.1 -I....includeQtCore5.5
.1QtCore -I....includeQtCore -I.mocdebug -I....mkspecswin32-msvc2015 -Fo
.objdebug @C:UsersUserAppDataLocalTempnm8A5A.tmp
qopenglcontext.cpp
kernelqopenglcontext.cpp(364): error C2065: 'GL_PROXY_TEXTURE_2D': undeclared i
dentifier
kernelqopenglcontext.cpp(370): error C2065: 'QOpenGLFunctions_1_0': undeclared
identifier
kernelqopenglcontext.cpp(370): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(371): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
ared identifier
kernelqopenglcontext.cpp(371): error C2065: 'gl3funcs': undeclared identifier
kernelqopenglcontext.cpp(374): error C2065: 'gl3funcs': undeclared identifier
kernelqopenglcontext.cpp(374): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
ared identifier
kernelqopenglcontext.cpp(374): error C2672: 'QOpenGLContext::versionFunctions':
no matching overloaded function found
kernelqopenglcontext.cpp(374): error C2974: 'QOpenGLContext::versionFunctions':
invalid template argument for 'TYPE', type expected
e:blind_sys_v02libsqt5.5.1qt-everywhere-opensource-src-5.5.1qtbaseinclude
qtgui../../src/gui/kernel/qopenglcontext.h(181): note: see declaration of 'QOp
enGLContext::versionFunctions'
kernelqopenglcontext.cpp(376): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(376): error C2065: 'QOpenGLFunctions_1_0': undeclared
identifier
kernelqopenglcontext.cpp(376): error C2672: 'QOpenGLContext::versionFunctions':
no matching overloaded function found
kernelqopenglcontext.cpp(376): error C2974: 'QOpenGLContext::versionFunctions':
invalid template argument for 'TYPE', type expected
e:blind_sys_v02libsqt5.5.1qt-everywhere-opensource-src-5.5.1qtbaseinclude
qtgui../../src/gui/kernel/qopenglcontext.h(181): note: see declaration of 'QOp
enGLContext::versionFunctions'
kernelqopenglcontext.cpp(378): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(378): error C2065: 'gl3funcs': undeclared identifier
kernelqopenglcontext.cpp(380): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(381): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(381): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernelqopenglcontext.cpp(381): note: type is 'unknown-type'
kernelqopenglcontext.cpp(381): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernelqopenglcontext.cpp(383): error C2065: 'gl3funcs': undeclared identifier
kernelqopenglcontext.cpp(383): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernelqopenglcontext.cpp(383): note: type is 'unknown-type'
kernelqopenglcontext.cpp(383): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernelqopenglcontext.cpp(395): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(396): error C2065: 'gl1funcs': undeclared identifier
kernelqopenglcontext.cpp(396): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernelqopenglcontext.cpp(396): note: type is 'unknown-type'
kernelqopenglcontext.cpp(396): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernelqopenglcontext.cpp(398): error C2065: 'gl3funcs': undeclared identifier
kernelqopenglcontext.cpp(398): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernelqopenglcontext.cpp(398): note: type is 'unknown-type'
kernelqopenglcontext.cpp(398): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 14.0
VCBINamd64cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:Program Files (x86)Microsoft Visual Studio 14.0
VCBINamd64nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
你对可能的解决方案有想法吗?
请删除整个Qt文件夹。再次从Qt档案中提取(到一个全新的文件夹中),使用您的新选项进行配置并构建。它应该起作用。
更改配置选项时的增量构建是有风险的,并且根本不能保证工作。
相关文章:
- 从 ParaView 构建自定义 Qt 应用程序示例时出错
- 使用 qt 进行 SSL 握手期间出错
- 从 Qt(release) 生成的文件执行.EXE文件时出错
- 在 Qt 中将 x 可执行文件作为按钮事件运行时出错
- 交叉编译 qt:加载共享库时出错
- 打开终端时出错:MacOs 10.12.4 上的 Qt Creator 未知
- 使用 PostgreSQL 编译静态 Qt 5.10.0 时出错
- 尝试从 Github 编译 OpenCV QT 代码时出错
- 使用 Qt (Ubuntu 14.04) 编译 qt-dab 时出错
- 使用由 Mingw 5.3 编译的 boost ASIO 库使用 QT 时出错
- 使用 Qt 创建器时出错:"multiple definition" "first defined here"
- 尝试使用共享库部署QT应用程序时出错
- 将 TagLib 链接到 Qt 时出错
- 为什么我在使用 Qt creator 用 C 编译代码时出错,但可以使用 make 文件轻松做到这一点
- 在 Qt 中使用 for 与 OpenCV3 时出错
- 使用 Qt 标头的递归包含时出错
- std::stoul 在带有 NDK r13b 的 Android 版 Qt 应用程序上出错
- LNK1104将Boost库添加到Qt项目时出错
- 尝试在Qt中运行应用程序时出错
- 仅在从命令行构建Qt项目时出错