我有一个qt c++普通程序。在windows中使用mingw8.1gcc作为编译器。
我可以在qtcreator中运行它。
但当我想使用windeplotqt进行部署时,它失败了:
a.exe does not seem to be a Qt executable
我的步骤是:
1. copy the exe from build-xxx-release/release/a.exe to a clean folder
2. open terminal from QT(mingw) from my windows start menu
3. cd the clean folder in terminal
4. windeployqt a.exe
然后错误就出来了。
这让我很生气,因为我多次重新安装QT。我可以确保我的qt是一个干净的环境。
有人能帮忙吗?
也许您使用了错误的"windeployqt";。
在win 10中,尝试查找安装Qt的目录,如C:QtQt6.1.06.1.0msvc2019_64bin
或C:QtQt6.1.06.1.0mingw81_64bin
。
您的";windeployqt.exe";可以在";msvc2019_64"mingw81_64";或其他。然后使用类似C:QtQt6.1.06.1.0msvc2019_64binwindeployqt.exe a.exe
的命令或C:QtQt6.1.06.1.0mingw81_64binwindeployqt.exe a.exe
,而不是windeployqt.exe a.exe
。