deniskrr
deniskrr

Reputation: 963

MSVCP140.dll missing

I just developed my first program in C++ and I wanted to share it with one of my friends.
But 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 we fix it?

Upvotes: 69

Views: 204143

Answers (4)

BlindGarret
BlindGarret

Reputation: 155

That usually means that your friend does not have the Microsoft redistributable for Visual C++. I am of course assuming you are using VC++ and not MingW or another compiler. Since your friend does not have VS installed as well there is no guarantee he has the redist installed.

VC++ Distro

Upvotes: 3

David Haim
David Haim

Reputation: 26516

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.

Upvotes: 95

Anon Mail
Anon Mail

Reputation: 4770

That's probably the C++ runtime library. Since it's a DLL it is not included in your program executable. Your friend can download those libraries from Microsoft.

Upvotes: -1

Kijewski
Kijewski

Reputation: 26043

Your friend's PC is missing the runtime support DLLs for your program:

Upvotes: 73

Related Questions