"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 |
"MSVCP140
D.dll" and "VCRUNTIME140
D.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.