VS2017 Static linking QGif Plugin
-
I'm working with 5.12.1 static build. Tried to use QMovie to display an animated gif on dialog, but it returned error "Unsupported Image Format", looks like I need to link with qgif.lib.
- Added Q_IMPORT_PLUGIN(qgif) to the main.cpp
- Added QT_STATICPLUGIN in preprocessor
- Added qgif.lib to VS Project Properties: Configuration -> Linker -> Additional Dependencies
I'm getting following error:
Error LNK2019 unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_qgif(void)" (?qt_static_plugin_qgif@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __thiscall StaticqgifPluginInstance::StaticqgifPluginInstance(void)" (??0StaticqgifPluginInstance@@QAE@XZ)
-
@Taytoo Resolved Windows vista style issue by adding "Plugin" at the end.
Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
and also adding uxtheme.lib to linker dependencies.
Resolved qgif plugin by using
Q_IMPORT_PLUGIN(QGifPlugin)
and adding qgif.lib to linker dependencies.
-
@Taytoo I've also been having issues with Windows UI on Win7 looking like Windows Classic and it looks like I need to import windows vista style library for that, which brings me back to this issue.
Tried:
- Q_IMPORT_PLUGIN(qwindowsvistastyle)
- Added qwindowsvistastyle.lib and qwindows.lib to Linker Additional Dependencies.
Getting a similiar error as previous one:
Error LNK2019 unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_qwindowsvistastyle(void)" (?qt_static_plugin_qwindowsvistastyle@@YA?BUQStaticPlugin@@XZ) referenced in function "void __cdecl `dynamic initializer for 'staticqwindowsvistastyleInstance''(void)" (??__EstaticqwindowsvistastyleInstance@@YAXXZ)
Can anyone please help me out, this is a blocking issue for me.
-
@Taytoo Resolved Windows vista style issue by adding "Plugin" at the end.
Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
and also adding uxtheme.lib to linker dependencies.
Resolved qgif plugin by using
Q_IMPORT_PLUGIN(QGifPlugin)
and adding qgif.lib to linker dependencies.
-
@Taytoo Help me the solution to build QT Static for window support qgif ?