【发布时间】:2014-06-16 07:53:14
【问题描述】:
在尝试正确构建 Qt 之后,我终于做到了:
configure -static -debug-and-release -developer-build -mp -opengl desktop -platform win32-msvc2013 -no-webkit -qt-zlib
和
/MT, MTd mkspecs\win32-msvc2013\qmake.conf 中的标志
但对我帮助不大。
我正在使用带有 QT 插件 1.2.3 的 VS2013 Pro,当我尝试编译插件模板时,我收到 55 个未解决的外部错误,其中大部分来自 OpenGL,所以我将 opengl32.lib 添加到链接器,并且错误数减少到 42,但仍然大部分来自 OpenGL。像 GLU32 或 Qt5OpenGL 这样的库根本没有帮助我。
这里有几个来自链接器的未解决的外部符号错误:
_WSAAsyncSelect@16 referenced in function "private: void __thiscall QEventDispatcherWin32::createInternalHwnd(void)" (?createInternalHwnd@QEventDispatcherWin32@@AAEXXZ)
_glBindBuffer@8 referenced in function "public: bool __thiscall QOpenGLBuffer::bind(void)" (?bind@QOpenGLBuffer@@QAE_NXZ)
_glCompileShader@4 referenced in function "public: bool __thiscall QOpenGLShaderPrivate::compile(class QOpenGLShader *)" (?compile@QOpenGLShaderPrivate@@QAE_NPAVQOpenGLShader@@@Z)
_glUniform4fv@12 referenced in function "public: void __thiscall QOpenGLFunctions::glUniform4fv(int,int,float const *)" (?glUniform4fv@QOpenGLFunctions@@QAEXHHPBM@Z)
对我来说这很奇怪,因为这些错误来自核心 gl lib,它是链接的:
qtmain.lib
Qt5Core.lib
Qt5Gui.lib
Qt5Widgets.lib
opengl32.lib
有人知道怎么解决吗?
【问题讨论】: