打包动态库
Qt 官方开发环境里自带了一个工具:windeployqt.exe。
win+r 然后输入 cmd 打开命令提示行,切换到编译完的软件目录下,假设软件名叫 abc.exe,在命令行里输入 windeployqt abc.exe,就会把需要的动态库都复制到该软件目录下。
C:\Qt\Qt5.13.1\5.13.1\msvc2015_64\bin\windeployqt.exe demo.exe
C:\Qt\Qt5.13.1\5.13.1\winrt_x64_msvc2017\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\msvc2017_64\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\msvc2017\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\mingw73_64\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\winrt_x64_msvc2017\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\winrt_x64_msvc2015\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\winrt_armv7_msvc2015\bin\windeployqt.exe
C:\Qt\Qt5.13.1\5.13.1\winrt_armv7_msvc2017\bin\windeployqt.exe
Warnning
warning:Cannot find Visual Studio installation directory,VCINSTALLDIR is not set.
设置环境变量VCINSTALLDIR的值为VS目录,比如我的C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC