QT dlls needed after build on Windows



  • I successfully built an application and ran dependency walker on the exe. It showed the dependencies including a number of qt5 dlls which were not installed on the path when I installed qt. I can find the dlls in the particular kit I used to build /bin directory.

    Is there a way to deploy the exe so that qt creator automatically adds any needed dlls to the output directory of the exe.

    Was qt supposed to add its own dlls to the path when I installed qt ?

    I see the same qt dlls in the /bin directory of each of my kits as well as some of them in the /tools/qtcreator/bin directory. is the same-named dll the exact same dll each time ?




  • Moderators

    Hi,

    @eldiener said:

    Is there a way to deploy the exe so that qt creator automatically adds any needed dlls to the output directory of the exe.

    See @Leonardo's link for automatic deployment. However, not that the tool is still not perfect, because it can't always know which plugins your app needs.

    Was qt supposed to add its own dlls to the path when I installed qt ?

    No. Adding DLLs to the PATH can cause DLL Hell -- programs can crash.

    I see the same qt dlls in the /bin directory of each of my kits as well as some of them in the /tools/qtcreator/bin directory. is the same-named dll the exact same dll each time ?

    They are not the same. You must not use the DLLs in /tools/qtcreator/bin. These are for Qt Creator only, not for your apps. (Qt Creator is also an .exe that is built with Qt, so it needs Qt DLLs to run)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.