我已经尝试解决这个问题很长时间了,现在我真的必须解决它(不知何故):)
我正在尝试构建 Qt 5 的静态版本,这显然不像我在许多教程中阅读的那么容易(显然不是为 Qt 5 编写的,而是为以前的版本编写的)。
我下载并安装了带有 MinGW 4.7 的 Windows 32 位 Qt 5.0.1。尝试构建静态版本时
configure -static -release
接着
mingw32-make
我得到错误:
kernel\qplatformopenglcontext.cpp: In constructor 'QPlatformOpenGLContextPrivate
::QPlatformOpenGLContextPrivate()':
kernel\qplatformopenglcontext.cpp:85:39: error: class 'QPlatformOpenGLContextPri
vate' does not have any field named 'context'
kernel\qplatformopenglcontext.cpp: At global scope:
kernel\qplatformopenglcontext.cpp:90:1: error: 'QPlatformOpenGLContext' does not
name a type
kernel\qplatformopenglcontext.cpp:95:1: error: 'QPlatformOpenGLContext' does not
name a type
kernel\qplatformopenglcontext.cpp:104:1: error: 'GLuint' does not name a type
kernel\qplatformopenglcontext.cpp:109:1: error: 'QOpenGLContext' does not name a
type
kernel\qplatformopenglcontext.cpp:115:6: error: 'QPlatformOpenGLContext' has not
been declared
kernel\qplatformopenglcontext.cpp:115:41: error: variable or field 'setContext'
declared void
kernel\qplatformopenglcontext.cpp:115:41: error: 'QOpenGLContext' was not declar
ed in this scope
kernel\qplatformopenglcontext.cpp:115:57: error: 'context' was not declared in t
his scope
kernel\qplatformopenglcontext.cpp:121:6: error: 'QPlatformOpenGLContext' has not
been declared
Makefile.Release:22330: recipe for target '.obj/release_static/qplatformopenglco
ntext.o' failed
mingw32-make[3]: *** [.obj/release_static/qplatformopenglcontext.o] Error 1
mingw32-make[3]: Leaving directory 'C:/Qt/Qt5.0.1/5.0.1/Src/qtbase/src/gui'
Makefile:34: recipe for target 'release' failed
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directory 'C:/Qt/Qt5.0.1/5.0.1/Src/qtbase/src/gui'
Makefile:251: recipe for target 'sub-gui-make_first' failed
mingw32-make[1]: *** [sub-gui-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/Qt5.0.1/5.0.1/Src/qtbase/src'
makefile:40: recipe for target 'sub-src-make_first' failed
mingw32-make: *** [sub-src-make_first] Error 2
这里有人用 Qt 5 做过这个吗?
非常感谢你提前!