Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. windeployqt.exe does not gather the correct DLLs
Qt 6.11 is out! See what's new in the release blog

windeployqt.exe does not gather the correct DLLs

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 3 Posters 2.8k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    stvokr
    wrote on last edited by
    #1

    Hello,

    I wonder how the windeployqt.exe is used correctly.
    I am using Qt 5.9.1 with x86 and x64, windows 10, installed to C:\Qt\5.9.1\msvc2015 and C:\Qt\5.9.1\msvc2015_64 via qt online installer.

    I was currently using the windeployqt.exe from the x64 directory to gather the corresponding dlls to my 64 bit application (exe). I used the binarycreator to build an installer, copied the installer to another computer, installed it and my application could not be started. I found out that the windeployqt.exe took the 32 bit dlls instead of the 64 bit dlls.

    I found out, that the problem is that I added the Qt install paths to the PATH environment variable, so I made some tests:

    • When the install paths of both Qt installations are NOT added to the PATH environment variable, die windeployqt.exe from the 64 bit Qt is gathering the correct DLLs as well as the 32 bit version. So this is the correct beaviour of the windeployqt.exes.
    • When at least one of the install paths of the Qt installations is added to the PATH environment variable, the windeployqt.exe (64 bit as well as 32 bit) is somehow taking the first Qt path set in this variable. So it depends on this path which DLLs are gathered for the installation.

    It does not depend on the QTDIR environment variable, which I thought first.

    Can someone reproduce this?
    And / or can some explain this?

    regards
    Oliver

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Because when you call windeployqt on the command line, you will be calling the first the system can find which will be the one in the order of the PATH environment variable.

      Basically: don't modify your PATH environment variable system wide like you do especially when dealing with development software.

      Qt Creator does the work for you when you develop so you don't have to do funky stuff to get your application running. If you want to use something like windeployqt from the command line, IIRC, Qt already provides links with environment setup done to get a command line ready to use. So you should rather use that or like on other OS, use the full path to the executable you want to use.

      Again: do not modify the PATH environment variable system wide.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rtavakko
        wrote on last edited by
        #3

        On my 64-bit machine, if I modify the path files for both 32-bit (5.11.3) and 64-bit (5.12.0), windeployqt grabs the correct QT dlls (core, gui etc.) but seems to grab the runtime dlls of the first path variable (the 64-bit one in my case).

        For example it copies the 64-bit libstdc++-6.dll into both 32-bit and 64-bit builds of a project.

        If no path is specified, it doesn't copy the compiler runtime dlls. I run each tool (32-bit / 64-bit) with its full path specified with options --release --compiler-runtime.

        Is this the right behaviour?

        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