nic*_*ick 5 c++ qt windeployqt
我有一个 qt c++ 普通程序。在Windows中使用mingw8.1 gcc作为编译器。
我可以在 qt Creator 中运行它。
但是当我想使用windeplotqt进行部署时,它失败了:
a.exe does not seem to be a Qt executable
Run Code Online (Sandbox Code Playgroud)
我的步骤是:
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
Run Code Online (Sandbox Code Playgroud)
然后错误就出来了。
这让我发疯,因为我多次重新安装QT。我可以确保我的qt是一个干净的环境。
有人可以帮忙吗?
也许您使用了错误的“windeployqt”。
在win 10中,尝试找到Qt的安装目录,例如C:\Qt\Qt6.1.0\6.1.0\msvc2019_64\bin或C:\Qt\Qt6.1.0\6.1.0\mingw81_64\bin。
您的“windeployqt.exe”可能位于“msvc2019_64”、“mingw81_64”或其他文件中。C:\Qt\Qt6.1.0\6.1.0\msvc2019_64\bin\windeployqt.exe a.exe
然后使用类似or 的命令C:\Qt\Qt6.1.0\6.1.0\mingw81_64\bin\windeployqt.exe a.exe
代替windeployqt.exe a.exe。