Qt windeployqt failed with: does not seem to be a Qt executable?

2.9k Views Asked by At

I have a qt c++ plain program. using mingw8.1 gcc as compilier in windows.

I can run it in qt creator.

But when i want to use windeplotqt to deploy, it failed with:

a.exe does not seem to be a Qt executable

my step is:

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

then the error come out.

It driven me mad, because i reinstall QT for many times. I can ensure my qt is a clean environment.

Can anyone help on this?

1

There are 1 best solutions below

0
yxh On

maybe you use the wrong "windeployqt".

In win 10,try to find the directory where Qt is installed,like C:\Qt\Qt6.1.0\6.1.0\msvc2019_64\bin or C:\Qt\Qt6.1.0\6.1.0\mingw81_64\bin.

Your "windeployqt.exe" may be in the "msvc2019_64", "mingw81_64" or others. then use the command like 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 ,instead of windeployqt.exe a.exe.