Important: Please read the Qt Code of Conduct -

Qt DLLs and VS2017

  • I've added the Windows Migration Framework (QMFCApp) stuff to my VS2017 project and it builds fine.

    I distribute both 32 bit and 64 bit versions of the code, so have to build for both.

    When I attempt to run the application I get complaints that the Qt DLLs can't be found (e.g. QtCore.dll).

    Obviously I cannot add both C:\Qt\5.12.8\msvc2017\bin AND C:\Qt\5.12.8\msvc2017_64 \bin to LIBPATH , and adding only one would guarantee that it would be incorrect half of the time!

    So how can I configure the project to use C:\Qt\5.12.8\msvc2017\bin to search for the DLLs for 32 bit builds, and :\Qt\5.12.8\msvc2017_64 \bin for the 64 bit builds?

    For now I've bodged it by putting the appropriate Qt DLLs into the x86\Release x86\Debug x64\Release and x64\Debug folders.

    I'd prefer to handle this a bit more tidily though, so suggestions most welcome.


  • Lifetime Qt Champion


    If you mean that it fails to start the application when going to the build folder to start it, then you have to deploy them like you would for running them in a different computer. You can use windeployqt for that.

Log in to reply