How do I get some laptops to not need to install vc_redisk on msvc2019?
-
on some laptops there is an error in the application I made in qt creator
- VCRUNTIME140.dll - VCRUNTIME140_1.dll - MSVCP140.dll
to solve this error, you need to install vc_redisk, but how do you make the application not error without installing vc_redisk, is that possible? , I am using MSVC2019_64bit
-
@Blackzero said in How do I get some laptops to not need to install vc_redisk on msvc2019?:
s that possible
No, the runtime is needed.
-
To avoid the dependency of the VC runtime dlls, another option is try to build a static version of Qt and use the config option -static-runtime. Then build your app with that version of Qt.
Note: your app will still need msvcrt.dll but that file is included in all Windows versions. -
@Blackzero by using something other than a MSVC compiler obviously.
Otherwise your application will require that library set.
Don't expect other dependencies to pop up and cause issues though :D
You could make an installer and ship/auto install vc_redisk Microsoft allows that
-
At https://learn.microsoft.com/en-us/cpp/windows/deployment-in-visual-cpp?view=msvc-170 we can see that there are 3 ways of having the Visual C++ Runtime available:
- Central deployment
- Local deployment
- Static linking
The easiest way it's the local deployment, which means that you only have to have the above mentioned dlls next to your executable.
If you are using CMake, then you just have to add one line to your
CMakeLists.txt
file:include(InstallRequiredSystemLibraries)