Automatic Copy of Dependent Files in Qt Creator

后端 未结 4 1216
南旧
南旧 2020-12-14 10:48

I\'ve build a program using Qt Creator 2.2.1 and Qt 4.7.4 (32 bit) whose output is an executable. Opening the exe using DependencyWalker it shows that the exe uses following

4条回答
  •  醉话见心
    2020-12-14 11:23

    No-no-no 0_o :)

    1. Create some directory to deploy files, i.e. "bin".
    2. In every .pro file write

      DLLDESTDIR = ../../myproject/bin (... some dir's struct ...)

      QMAKE_POST_LINK = windeployqt --compiler-runtime $$DLLDESTDIR

    DLLDESTDIR -- full path with file name TARGET (dll and exe).

    End!

提交回复
热议问题