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

QMAKE_PRL_LIBS contains wrong entries on Windows

    XMLWordPrintable

Details

    • Windows
    • 1ef5016bab3bce06ada14bc961a2a1db93d3060b (qt/qtbase/dev) f193e7a793171bd8c3b46f5980c1cf847cb171a6 (qt/qtbase/6.0)

    Description

      The Problem

      When building qtactiveqt against qtbase with MSVC, Qt6AxServer.prl contains the following:

      QMAKE_PRL_LIBS = -lshell32 $$[QT_INSTALL_LIBS]/Qt6AxBase.lib -ladvapi32 -lgdi32 -lole32 -loleaut32 -luser32 Qt6Widgets Qt6Gui Qt6Core -lmpr -luserenv -ld3d11 -ldxgi -ldxguid
      

      The entries for the modules from qtbase are incorrect. The line should be

      QMAKE_PRL_LIBS = -lshell32 $$[QT_INSTALL_LIBS]/Qt6AxBase.lib -ladvapi32 -lgdi32 -lole32 -loleaut32 -luser32 $$[QT_INSTALL_LIBS]/Qt6Widgets.lib $$[QT_INSTALL_LIBS]/Qt6Gui.lib $$[QT_INSTALL_LIBS]/Qt6Core.lib -lmpr -luserenv -ld3d11 -ldxgi -ldxguid
      

      Analysis

      This is what happens:

      • The libraries AxServer links against is determined by qt_collect_libs
      • The full path to Qt6Widgets.dll is written into preliminary_prl_for_AxServer_step1_Release.prl
      • QtFinishPrlFile.cmake is run to transform preliminary_prl_for_AxServer_step1_Release.prl into preliminary_prl_for_AxServer_step2_Release.prl
      • QtFinishPrlFile.cmake fails to determine that Qt6Widgets.dll is a Qt module and writes it as just Qt6Widgets

      And it fails to determine that this is a Qt module, because we check whether the library is below ${QT_LIB_DIRS} which contains ${CMAKE_INSTALL_PREFIX}/lib. Qt6Widgets.dll is in ${CMAKE_INSTALL_PREFIX}/bin, however.

      This can be fixed in two ways:

      • write the full path to Qt6Widgets.lib into preliminary_prl_for_AxServer_step1_Release.prl
      • or pass the bin dir to QT_LIB_DIRS when creating the 2nd stage prl file

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes