如何使用动态OpenGL实现构建qt3d(qt5.4-OpenGL动态)

如何使用动态OpenGL实现构建qt3d(qt5.4-OpenGL动态),opengl,dynamic,qt3d,qt5.4,Opengl,Dynamic,Qt3d,Qt5.4,我已经用-opengl动态编译了qt5.4。我已经对它进行了测试,回退效果很好。现在我还想用动态opengl qt库编译qt3d。可能吗?问题是我的建筑以下面的链接问题结束。如果我理解正确,我不应该添加任何opengl库……我该如何解决这个问题 \ConvertUTF" -I"..\..\3rdparty\assimp\contrib\zlib" -I"..\..\3rdparty\assimp\contrib\irrXML" -I"..\..\3rdparty\assimp\contrib\u

我已经用-opengl动态编译了qt5.4。我已经对它进行了测试,回退效果很好。现在我还想用动态opengl qt库编译qt3d。可能吗?问题是我的建筑以下面的链接问题结束。如果我理解正确,我不应该添加任何opengl库……我该如何解决这个问题

\ConvertUTF" -I"..\..\3rdparty\assimp\contrib\zlib" -I"..\..\3rdparty\assimp\contrib\irrXML" -I"..\..\3rdparty\assimp\contrib\unzip" -I"scene_bezier" -I"network" -I"graphicsview" -I"textures" -I"surfaces" -I"api" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtCore\5.4.0" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtCore\5.4.0\QtCore" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtGui\5.4.0" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtGui\5.4.0\QtGui" -I"C:\Qt\5.4_angle\5.4\msvc2013\include" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtOpenGL" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtWidgets" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtGui" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtANGLE" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtCore" -I"C:\Qt\5.4_angle\5.4\msvc2013\include\QtNetwork" -I".moc\debug" -I"C:\Qt\5.4_angle\5.4\msvc2013\mkspecs\win32-msvc2013" -Fo.obj\debug\ @C:\Users\eDS\AppData\Local\Temp\moc_qgltexture2d_p.obj.1576.138606.jom
moc_qgltexture2d_p.cpp
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.30 /MANIFEST:embed /OUT:..\..\lib\Qt53Dd.dll @C:\Users\eDS\AppData\Local\Temp\Qt53Dd.dll.1576.142070.jom
   Creating library ..\..\lib\Qt53Dd.lib and object ..\..\lib\Qt53Dd.exp
qglpainter.obj : error LNK2019: unresolved external symbol __imp__glColor4f@16 referenced in function "public: void __thiscall QGLPainter::updateFixedFunction(class QFlags<enum QGLPainter::Update>)" (?updateFixedFunction@QGLPainter@@QAEXV?$QFlags@W4Update@QGLPainter@@@@@Z)
qglpainter.obj : error LNK2019: unresolved external symbol __imp__glColorPointer@16 referenced in function "void __cdecl qt_gl_setVertexAttribute(enum QGL::VertexAttribute,class QGLAttributeValue const &)" (?qt_gl_setVertexAttribute@@YAXW4VertexAttribute@QGL@@ABVQGLAttributeValue@@@Z)
qglpainter.obj : error LNK2019: unresolved external symbol __imp__glLightModelfv@8 referenced in function "public: void __thiscall QGLPainter::updateFixedFunction(class QFlags<enum QGLPainter::Update>)" (?updateFixedFunction@QGLPainter@@QAEXV?
\ConvertUTF“-I”.\..\3rdparty\assimp\contrib\zlib“-I”.\..\3rdparty\assimp\contrib\irrXML“-I”.\..\3rdparty\assimp\contrib\unzip“-I”场景\u bezier“-I”网络“-I”图形视图“-I”纹理“-I”表面“-I”api“-I”C:\Qt\5.4\msvc2013\include\QtCore 5.4.0“-I”C:\QtCore 5.4\QtCore 5.4\msvc2013\QtCore3.4.0“I”C:\Qt\5.4 4.4.4\5.4.4\5.4\5.4\msvc2013\5.4\4.4\5.4\msvc2013\包括包括包括\QtGui\5.4.4.4.4.0\QtGui\5.4\5.4\5.4\msvc2013年4.4\5.4.4.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4.4\msvvvvvvvvvv2013\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\5.4\msvvvvvvvQT角“-I”C:\Qt\5.4\u angle\5.4\msvc2013\include\QtCore“-I”C:\Qt\5.4\u angle\5.4\msvc2013\include\QtNetwork“-I”.moc\debug“-I”C:\Qt\5.4\u angle\5.4\msvc2013\mkspecs\win32-msvc2013“-Fo.obj\debug\@C:\Users\eDS\AppData\Local\Temp\moc\u qgltexture2d\u p.obj.1576.138606.jom
moc_QGLE2D_p.cpp
link/NOLOGO/DYNAMICBASE/NXCOMPAT/DEBUG/DLL/SUBSYSTEM:WINDOWS/VERSION:5.30/MANIFEST:embed/OUT:..\..\lib\Qt53Dd.DLL@C:\Users\eDS\AppData\Local\Temp\Qt53Dd.DLL.1576.142070.jom
正在创建库..\\lib\Qt53Dd.lib和对象..\..\lib\Qt53Dd.exp
qglpainter.obj:错误LNK2019:未解析的外部符号\uuuu imp__glColor4f@16在函数“public:void\u thiscall QGLPainter::updateFixedFunction(类QFlags)”中引用(?updateFixedFunction@QGLPainter@@QAEXV$QFlags@W4Update@QGLPainter@@@@@@Z)
qglpainter.obj:错误LNK2019:未解析的外部符号\uuuu imp__glColorPointer@16在函数“void\uu cdecl qt\u gl\u setVertexAttribute(枚举QGL::VertexAttribute,类QGLattributeevalue const&)”中引用(?qt\u gl\u setVertexAttribute@@YAXW4VertexAttribute@QGL@@ABVQGLAttributeValue@@@Z)
qglpainter.obj:错误LNK2019:未解析的外部符号\uuuu imp__glLightModelfv@8在函数“public:void\u thiscall QGLPainter::updateFixedFunction(类QFlags)”中引用(?updateFixedFunction@QGLPainter@@QAEXV?

glColor4f
glColorPointer
glLightModelfv
都是OpenGL 1.1或更早版本的函数

在Windows上,
OpenGL32.lib
有责任在链接时提供这些内容。Windows上比1.1更新的OpenGL的任何部分都必须在运行时动态加载,如果您使用适当的包装类,Qt实际上会为您这样做


无论如何,要解决这个问题,只需将
OpenGL32.lib
添加到链接器依赖项中。

这篇文章提到了这个新的Qt特性(
-opengl dynamic
) 说:

想要动态切换的应用程序必须始终使用 QoPengl功能,并准备好在OpenGL和OpenGL上运行 ES 2.0


因此,您不能使用像
glColor4f
glColorPointer
glLightModelfv
glBegin
等从OpenGL ES 2.0中删除的函数。正如@AndonMColreman所说,这些函数都是旧的,并且不在OpenGL ES 2.0中,而OpenGL ES 2.0是最主要的一组函数(这是QT可以使用的另一种OpenGL实现)实现。因此,我希望这些功能只能在
-OpenGL desktop
中使用,这意味着qt3d还没有为新的动态OpenGL实现做好准备,……对吗?