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

windeployqt reports "Unable to find dependent libraries..." when run in environment where $QTDIR/bin is not in the path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 5.5.0
    • 5.3.0
    • Windows 7 and Windows 8.1
      Qt-5.3.0 (self compiled as it's not distributed in both 32- and 64-bit flavors for VS 2010)
      Visual Studio 2010
    • c401dd9059bf6ed204debba8a0d4930f76c38eb5 (qttools/5.5, 30.4.2015, 5.5)

      If $QTDIR/bin is not in the PATH, and Qt 5.3.0 is not in the same location as it was "nmake install"ed to when being run, windeployqt reports the following when run:

      Unable to find dependent libraries of C:\Qt\5.3.0\vs2010-win64w\bin\Qt5Widgetsd.
      dll :Cannot open 'C:/Qt/5.3.0/vs2010-win64w/bin/Qt5Widgetsd.dll': The system can
      not find the path specified.

      C:/Qt/5.3.0/vs2010-win64w is the nmake install path when Qt was built. From there the binaries are checked into our external dependency repository, and checked out by developers wherever it is needed on their local system for their development purposes.

      Unfortunately, even though windeployqt is sitting in the bin directory with all of the DLLs needed, and with a qt.conf file (attached) in the same directory, windeployqt seems to be falling back to some hard coded path in the binaries to lookup DLL locations.

      Steps to reproduce:

      1) build Qt and nmake install it to one location.
      2) Move Qt to a new location
      3) build a program and run windeployqt.exe on it. windeployqt will fail with the above message.

      What I've tried:

      1) As stated, putting QTDIR/bin in the PATH works, but it is an unacceptable solution in my environment. Our software is supported on both 32-and 64-bit Windows. That would require developers altering the PATH every time they switch between 32- and 64-bit development.

      2) qt.conf file (see attached) in the QTDIR/bin directory along side windeployqt.exe. qt.conf seems to be ignored.

      What I need:

      A way to make this tool work as advertised and deploy the necessary DLLs along side my application.

        1. qt.conf
          0.2 kB
        2. qtbug39177_diag.diff
          1 kB
        For Gerrit Dashboard: QTBUG-39177
        # Subject Branch Project Status CR V

            kleint Friedemann Kleint
            glimberg Grant Limberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes