WIndeployqt not copying msvcp140.dll to deployment folder
-
I have a Qt6 application whose executable depends on several DLLs. When I run windeployqt, it successfully copies most of the Qt and system DLLs, but it fails to copy the following runtime DLLs:
MSVCP140.dll
VCRUNTIME140_1.dll
VCRUNTIME140.dllMy application also depends on:
boost_serialization-vc143-mt-x64-1_84.dll
Qt6Gui.dll
Qt6Core.dll
Qt6Widgets.dll
KERNEL32.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dllI’ve tried windeployqt --release --compiler-runtime and also --force, but the MSVC runtime DLLs are still not copied.
Can someone advise the recommended way to deploy these dependencies, or why windeployqt might be skipping these MSVC runtime DLLs?
-
I have a Qt6 application whose executable depends on several DLLs. When I run windeployqt, it successfully copies most of the Qt and system DLLs, but it fails to copy the following runtime DLLs:
MSVCP140.dll
VCRUNTIME140_1.dll
VCRUNTIME140.dllMy application also depends on:
boost_serialization-vc143-mt-x64-1_84.dll
Qt6Gui.dll
Qt6Core.dll
Qt6Widgets.dll
KERNEL32.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-stdio-l1-1-0.dllI’ve tried windeployqt --release --compiler-runtime and also --force, but the MSVC runtime DLLs are still not copied.
Can someone advise the recommended way to deploy these dependencies, or why windeployqt might be skipping these MSVC runtime DLLs?
@Rajakumar.S_qtqml
Preface by saying I don't use Qt under Windows and have never used windeployqt. But so far as I know usually those files are not installed/placed with a particular executable. Rather they are installed system-wide. And should be checked to see if they are a later version anyway. Do you already have these somewhere like your Windows directory? If you try to run the app on the target installed system does it complain it can't find them or does it run fine finding them elsewhere? -
That's because its not supposed to, those are part of the Microsoft Visual Studio c++ redisbutable issued by Microsoft themselves, but you are allowed to pack a version in any potential installer and install it/update it during your app installation
-
As @J.Hilk said those files are part of the VS redistributable package, but you don't have to look for it or download it yourself. The redist installer is provided as part of your MSVC toolchain and windeployqt will copy it over to your deploy dir, but for it to be able to locate it, you have to set up the environment first, so it knows which toolchain to use.
If you're building for x64 run the
vcvars64.batfrom your toolchain dir (for VS 2026 Community it is located in
<Program Files>\Microsoft Visual Studio\2026\Community\VC\Auxiliary\Build\vcvars64.bat) and then run windeployqt in the same command prompt session. For arm, x86 or different VS version look up the appropriate .bat instead.With that you will get
vc_redist.x64.exe(or equivalent for other configurations) in your deployment dir. This is meant to be run by your installer (usually with/install /quietparams) and it will place those DLLs in your system directory.That being said you can provide those files manually along with your executable, but it is not the way they are meant to be used.