我使用默认配置成功构建了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.pch\debug\Qt5Guid_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..\..\include\QtGui
-I..\..\include\QtANGLE -I..\..\include\QtGui\5.5.1 -I..\..\include\QtGui\5.5.1\
QtGui -Itmp -I..\3rdparty\libpng -I..\3rdparty\zlib -I..\3rdparty\harfbuzz-ng\in
clude -I..\3rdparty\zlib -I..\..\include\QtCore\5.5.1 -I..\..\include\QtCore\5.5
.1\QtCore -I..\..\include\QtCore -I.moc\debug -I..\..\mkspecs\win32-msvc2015 -Fo
.obj\debug\ @C:\Users\User\AppData\Local\Temp\nm8A5A.tmp
qopenglcontext.cpp
kernel\qopenglcontext.cpp(364): error C2065: 'GL_PROXY_TEXTURE_2D': undeclared i
dentifier
kernel\qopenglcontext.cpp(370): error C2065: 'QOpenGLFunctions_1_0': undeclared
identifier
kernel\qopenglcontext.cpp(370): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(371): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
ared identifier
kernel\qopenglcontext.cpp(371): error C2065: 'gl3funcs': undeclared identifier
kernel\qopenglcontext.cpp(374): error C2065: 'gl3funcs': undeclared identifier
kernel\qopenglcontext.cpp(374): error C2065: 'QOpenGLFunctions_3_2_Core': undecl
ared identifier
kernel\qopenglcontext.cpp(374): error C2672: 'QOpenGLContext::versionFunctions':
no matching overloaded function found
kernel\qopenglcontext.cpp(374): error C2974: 'QOpenGLContext::versionFunctions':
invalid template argument for 'TYPE', type expected
e:\blind_sys_v02\libs\qt\5.5.1\qt-everywhere-opensource-src-5.5.1\qtbase\include
\qtgui\../../src/gui/kernel/qopenglcontext.h(181): note: see declaration of 'QOp
enGLContext::versionFunctions'
kernel\qopenglcontext.cpp(376): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(376): error C2065: 'QOpenGLFunctions_1_0': undeclared
identifier
kernel\qopenglcontext.cpp(376): error C2672: 'QOpenGLContext::versionFunctions':
no matching overloaded function found
kernel\qopenglcontext.cpp(376): error C2974: 'QOpenGLContext::versionFunctions':
invalid template argument for 'TYPE', type expected
e:\blind_sys_v02\libs\qt\5.5.1\qt-everywhere-opensource-src-5.5.1\qtbase\include
\qtgui\../../src/gui/kernel/qopenglcontext.h(181): note: see declaration of 'QOp
enGLContext::versionFunctions'
kernel\qopenglcontext.cpp(378): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(378): error C2065: 'gl3funcs': undeclared identifier
kernel\qopenglcontext.cpp(380): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(381): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(381): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernel\qopenglcontext.cpp(381): note: type is 'unknown-type'
kernel\qopenglcontext.cpp(381): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernel\qopenglcontext.cpp(383): error C2065: 'gl3funcs': undeclared identifier
kernel\qopenglcontext.cpp(383): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernel\qopenglcontext.cpp(383): note: type is 'unknown-type'
kernel\qopenglcontext.cpp(383): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernel\qopenglcontext.cpp(395): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(396): error C2065: 'gl1funcs': undeclared identifier
kernel\qopenglcontext.cpp(396): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernel\qopenglcontext.cpp(396): note: type is 'unknown-type'
kernel\qopenglcontext.cpp(396): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
kernel\qopenglcontext.cpp(398): error C2065: 'gl3funcs': undeclared identifier
kernel\qopenglcontext.cpp(398): error C2227: left of '->glGetTexLevelParameteriv
' must point to class/struct/union/generic type
kernel\qopenglcontext.cpp(398): note: type is 'unknown-type'
kernel\qopenglcontext.cpp(398): error C2065: 'GL_TEXTURE_WIDTH': undeclared iden
tifier
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\amd64\nmake.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.
您对可能的解决方案有所了解吗?
答案 0 :(得分:0)
请删除整个Qt文件夹。再次从Qt存档中提取它(到一个全新的文件夹),使用您的新选项和构建进行配置。它应该工作。
更改配置选项时的增量构建存在风险,并且无法保证完全正常工作。