Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. VS2017 Static linking QGif Plugin
QtWS25 Last Chance

VS2017 Static linking QGif Plugin

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 733 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Taytoo
    wrote on 16 Apr 2019, 05:51 last edited by Taytoo
    #1

    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.

    1. Added Q_IMPORT_PLUGIN(qgif) to the main.cpp
    2. Added QT_STATICPLUGIN in preprocessor
    3. 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)
    
    T 1 Reply Last reply 18 Apr 2019, 03:06
    0
    • T Taytoo
      18 Apr 2019, 03:06

      @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:

      1. Q_IMPORT_PLUGIN(qwindowsvistastyle)
      2. 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.

      T Offline
      T Offline
      Taytoo
      wrote on 18 Apr 2019, 07:26 last edited by Taytoo
      #3

      @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.

      1 Reply Last reply
      2
      • T Taytoo
        16 Apr 2019, 05:51

        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.

        1. Added Q_IMPORT_PLUGIN(qgif) to the main.cpp
        2. Added QT_STATICPLUGIN in preprocessor
        3. 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)
        
        T Offline
        T Offline
        Taytoo
        wrote on 18 Apr 2019, 03:06 last edited by
        #2

        @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:

        1. Q_IMPORT_PLUGIN(qwindowsvistastyle)
        2. 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.

        T 1 Reply Last reply 18 Apr 2019, 07:26
        0
        • T Taytoo
          18 Apr 2019, 03:06

          @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:

          1. Q_IMPORT_PLUGIN(qwindowsvistastyle)
          2. 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.

          T Offline
          T Offline
          Taytoo
          wrote on 18 Apr 2019, 07:26 last edited by Taytoo
          #3

          @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.

          1 Reply Last reply
          2
          • N Offline
            N Offline
            Nguyen Thang Phong
            wrote on 1 Apr 2025, 09:55 last edited by
            #4

            @Taytoo Help me the solution to build QT Static for window support qgif ?

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved