Reputation: 67
I have a problem.
Wherever I try and run a c++ program (built in visual studios 2017 community edition)on another computer, it says three dlls are missing: vcredist, MSVCP140D, and ucrtbased.dll. The only solution to this I've found is by installing visual studios community on the other computer.
My question is: how do you create a program that doesn't constantly demand these dlls on the other computer? How do I fix this issue on my side?
Thank you for your time and any help you offer.
Kind regards, John
Upvotes: 0
Views: 327
Reputation: 1995
The problem that you're dealing with has to do with the way you are distributing your application and how you are linking the libraries it depends upon.
Your application links to the DLLs that you mention dynamically. That means that you'll need to include those libraries as separate files along with your application, or have the user install them separately on the target machine.
However, you could compile them into the application by linking statically. Microsoft discourages this practice, for reasons that might be related to overall system performance and memory management.
Have a look at this Microsoft article for more information on this distinction as it specifically relates to Windows application development.
Upvotes: 2