目录
方式1
环境:Qt5.15.2,MSVC2019 64位
- 将Release构建模式下编译生成的exe文件放入一个空目录下
- 打开Qt 5.15.2(MSVC 2019 64-bit)工具,比如说我的位于
C:\Users\wzh\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Qt5.15.2\5.15.2\MSVC 2019 (64-bit),然后进入包含exe文件的目录 - 执行
windeployqt xxx.exe命令,注意所使用的windeployqt工具的版本及位置,建议指定windeployqt工具所在的目录,例如:
D:\QT5.15.2\installation\5.15.2\msvc2019_64\bin\windeployqt.exe xxx.exe
- 对于报错
Warning: Cannot find Visual Studio installation directory, VCINSTALLDIR is not set,解决如下: - 添加一个系统环境变量名为VCINSTALLDIR,其值为D:\vs2019\Community\VC
- 重新执行windeployqt命令
浙公网安备 33010602011771号