c++qtvisual-c++vcredist

How to deploy Qt app compiled using MSCV so that it won't neet vc_redist installed?


Is there a way to deploy a Qt desktop application that is compiled using MSVC in such a way that it will be "portable" (just run exe from a folder, not install anything, not even install VC_redist)?

Of course, it is possible to use it if Microsoft Visual C++ Redistributable is installed on target computer, but is it possible to make it run without installing it (eg. by putting some dll from vcredist to application's folder)?


Solution

  • Just as you commented, you can use windeployqt to add Qt-related DLLs and resources. As for other required DLLs, you could use Dependencies to find them and MANUALLY copy them into your application folder, including MSVC DLLs.

    PS: I know manually copy those DLLs is low efficient and fallible. This is why I ask Is there any way to search and copy all the DLL dependencies?, but I haven't found a tool smart enough to do this chore automatically. You might try those tools mentioned in the comments, like NDepend, though.