visual studio - Why do I need to install MSVC++ redist.? -


I am in the process of learning VC ++, but I wonder why the end user needs MSWC ++?

As far as I can see in MSDN, not all, if all programs (actual DLL files) are used All the libraries already come with the system itself (User 32.dll, kernel32.dll, etc.).

But Paint and Notepad need MSWC ++, but my software, which is much simpler than Notepad, requires this sequence? What does runtime do? how does it work? What is a way to make my software without MSWC ++?

Runtime provides all standard functions and classes, such as std :: string And std :: vector as well as the support codes and exception handlers created by the constellations and destructors of the global object. This is a version of all, and for some time Visual C ++ has used it, but it was found that there were inconsistencies with the standard, so the newer versions of the compiler come with the fixes (Windows DLLs can not divide fixes because it can break existing programs)

Yes, you can avoid the need for runtime redistribution installer. You can use the / MT> build option, which collects all the necessary library functions in your executable. After that, you only need DLL that comes with Windows.

The setting is in project configuration under C / C + - & gt; Code Generation - & gt; Runtime Library

But note that this will make your executable file a little bigger, and any bug fixes (especially security fixes distributed through Windows Update) will not affect your program , Because you have a special implementation baked

Comments