-1

I made a console application in vs 2017, I can't run it on other computers, it gives a dll error

Error:vcruntime140_1.dll not found

M.C. D.
  • 1
  • 2
  • have you ever tried to build a release version? – JumHorn Sep 20 '22 at 05:39
  • yes, but it won't open. Can I make an application that can run on all Windows? is it possible? – M.C. D. Sep 20 '22 at 05:42
  • you can try https://stackoverflow.com/questions/64609544/build-an-exe-that-runs-without-c-redistributable-package – JumHorn Sep 20 '22 at 05:52
  • or you can search run a C++ exe without vc++ redistributable to find what todo – JumHorn Sep 20 '22 at 05:53
  • Consider statically linking the runtime, e.g. https://stackoverflow.com/questions/37398 – tresf Sep 20 '22 at 06:15
  • Right-click your project in “Solution Explorer”, select “Properties” from the popped menu. Then the “Property Pages” dialog opens. In the opened “Property Pages” dialog, select “Configuration Properties->C/C++->Code Generation->Runtime Library” , set its value to “Multi-threaded (/MT)” or “Multi-threaded Debug(/MTd)”. – M.C. D. Sep 20 '22 at 06:32

2 Answers2

0

You can rebuild your application with MT option. The program build with this option will not depends on crt dll. Because MT option means static link with C runtime library.

This is an example: how to set runtime library to Multithreaded (/MT) in VS2017?

Frank
  • 153
  • 6
-1

you can download vcruntime140_1.dll by searching on google, and then after you download vcruntime140_1.dll, copy and paste C: > Windows > SysWOW64 (if you using windows 64 bit) C: > Windows > System32 (if you using windows 32 bit)

Rezky RVL
  • 108
  • 5