Reputation: 53257
I set this build step to add deployment DLLs to my release folder:
Command: %{Qt:QT_INSTALL_BINS}/windeployqt.exe
Arguments: "%{CurrentProject:NativePath}\bin\server.exe" --no-translations
The correct QtXXXX.dll files are copied, but incorrect libstdc++-6.dll
is added. The correct one is located at QTDIR/bin/libstdc++-6.dll
, but instead, windeployqt.exe
copies this DLL file from C:\MinGW\bin
. If I try to run the application, I get this error:
How can I tell windeployqt.exe
to copy mingw files from %{Qt:QT_INSTALL_BINS}
instead of my MinGW installation folder?
The version of Qt I am using is Qt5.6.0-MinGW
with mingw49_32
.
Upvotes: 2
Views: 1322
Reputation: 59
If you don't use the batch file that sets up the environment and comes with Qt then just make sure that the first compiler g++.exe
found be windeployqt.exe
is the one coming with Qt and not the one that got installed with MinGW. This way the correct library will get copied.
As an example from my own current installation:
Qt is installed to C:\Qt\Qt5.8.0
and MinGW to C:\MinGW
. Hence I add C:\Qt\Qt5.8.0\Tools\mingw530_32\bin
before C:\MinGW\bin
to my PATH. These two paths each contain a compiler g++.exe
.
Upvotes: 2