Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-119548

Linking Qt Network in MinGW static build leads to undefined references from qnetworklistmanagerevents.cpp in qmake projects

    XMLWordPrintable

Details

    • Windows

    Description

      Leads to errors like these:

      :-1: error: C:\Qt\6.6.0-static\Src\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x6a): undefined reference to `__imp_VariantInit'
      :-1: error: C:\Qt\6.6.0-static\Src\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x13d): undefined reference to `__imp_VariantClear'
      :-1: error: C:\Qt\6.6.0-static\Src\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x1ea): undefined reference to `__imp_VariantClear'
      :-1: error: C:\Qt\6.6.0-static\Src\plugins\networkinformation\libqnetworklistmanager.a(qnetworklistmanagerevents.cpp.obj):qnetworklistmanagerevents.cpp:(.text$_ZN25QNetworkListManagerEvents24checkBehindCaptivePortalEv+0x261): undefined reference to `__imp_VariantClear'
      

      These symbols are defined in oleaut32.dll, and it is liked to, but MinGW requires libraries in specific order and the library is passed too late in the linker command.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              poikelin Joni Poikelin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes