Compiling for others use

So this is a super super easy question isn't it but still i have an issue with it
so i am trying to compile a program and it will run how ever i need on my pc but when i put it ona clean vm or on another pc it doesn't run giving these errors
MSVCP140D.dll and VCRUNTIME140D.dll missing
I am using Qt 5.7 Open Source (Just started using it like 2 days ago not even)
Anymore info needed just ask


 
Tell me if you need it but i don't think it does 
"MSVCP140.dll" and friends are part of the visual C++ redistributable package.
One solution is to install the most recent version of the redistributable package on the target PC (For example, most PC games expect this).
Another solution is to bundle your executable with all the necessary .dlls (Not recommended).

Another solution is to statically link the necessary libraries to your executable (In your case, recommended - at the cost of executable size).

However, there's one more thing:
MSVCP140D.dll and VCRUNTIME140D.dll missing


"MSVCP140D.dll" and "VCRUNTIME140D.dll" (notice the "D") are debug .dlls. The fact that your program wants these extensions tells me that you're distributing the debug build of your program, which is not a good idea. You should always distribute your release build. Searching "C++ release vs debug build" yields many useful results which you should study.

Finally, here's how to statically link the required libraries:
If you're using Visual Studio, navigate to the following field in your project's properties:

Configuration Properties > C/C++ > Code Generation > Runtime Library


Set that field to "Multi-threaded (/MT)"
Also, it's important that your build configuration is set to "release" - otherwise, by default, it will configure the debug build.
Last edited on
Do you know how i would do that with Qt
So this is a super super easy question isn't it but still i have an issue with it

It is really not a super easy question.
it is really not a super easy question.

My mistake sorry
Topic archived. No new replies allowed.