0

I have produced an exe from a C++ program using Visual Studio Community 2019. I gave the exe to a friend to run on his PC (he is not a programmer and does not have Visual Studio installed). When he ran my exe he got an error report that vcruntime140.dll was not found. I then had a vague recollection that I have had this issue giving my exe's to other people before and I seem to remember that I could do something at my end (a link option?) that completely avoided the need for the end user to have the dll on their system. Unfortunately I can not remember exactly what I needed to do.

EDIT: I see this question has been marked as a duplicate - I can see the logic behind this. The other question is closely related and the marked solution and will indeed sort out this problem. But I don't want to delete this question because my user reported a missing vcruntime140.dll not MSVCP140.dll. If someone is troubled by a missing vcruntime140.dll they would never find the "duplicate" question.

Mick
  • 8,284
  • 22
  • 81
  • 173
  • If your project is simple and does not require third party dlls you can use the static runtime. If your project requires third party dlls you should just create an installer and install the visual studio redistributable with your application – drescherjm Feb 13 '22 at 15:01
  • 4
    The expected way is to install appropriate MSVC redistributables. What you are looking for is static linking with VC runtime, using `/MT` or `/MTd` flags in configuration/properties/C++/runtime library option. By default it is "multithreaded DLL" (`/MD`) – Suthiro Feb 13 '22 at 15:02

0 Answers0