Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSVCP140.dll missing

I just developed my first program in C++ and I wanted to show it with one of my friends. Sadly, when he tries to open the exe it gets an error which says "MSVCP140.dll is missing". Why is this issue happening and how can he/I fix it?

like image 721
deniskrr Avatar asked Oct 07 '15 17:10

deniskrr


People also ask

What does MSVCP140 dll mean?

The MSVCP140. dll is a constituent file of the Visual C++ Redistributable for Visual Studio 2015. This whole package of data is responsible for the run-time components that are required to run C++ applications built using Visual Studio 2015.

Where is MSVCP140 dll installed?

It is a Windows DLL file developed by Microsoft and is located in the C:\Windows\System32 folder. MSVCP140. dll is also called as Microsoft® C Runtime Library, which belongs to Microsoft Visual C++ Redistributable Packages for Visual Studio® 2015.

How do I fix MSVCP140 dll missing Epic Games?

If you received this error message, you need to reinstall the Microsoft Visual C++ Redistributables on your PC. You can locate and download them here. After you finish installing them, restart your PC and try launching your game again.


1 Answers

Either make your friends download the runtime DLL (@Kay's answer), or compile the app with static linking.

In visual studio, go to Project tab -> properties - > configuration properties -> C/C++ -> Code Generation on runtime library choose /MTd for debug mode and /MT for release mode.

This will cause the compiler to embed the runtime into the app. The executable will be significantly bigger, but it will run without any need of runtime dlls.

like image 120
David Haim Avatar answered Oct 07 '22 18:10

David Haim