I have qt5.4 compiled with -opengl dynamic. I have tested it and the fallback works fine. Now I would like to also compile qt3d with the dynamic opengl qt libraries. Is that possible? Problem is that my building ends with linking problem below. And if I understand it correctly I should not add any opengl libraries....how can I solve this?
\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?
glColor4f
,glColorPointer
andglLightModelfv
are all OpenGL 1.1 or older functions.On Windows, it is the responsibility of
OpenGL32.lib
to provide those at link-time. Any parts of OpenGL newer than 1.1 on Windows have to be loaded dynamically at run-time and Qt actually does this for you if you use the appropriate wrapper classes.In any event, to solve this simply add
OpenGL32.lib
to your linker dependencies.