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

    • Windows

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes