Under normal circumstances, when we compile a exe program of Console/Win32 type project with VC (not considering MFC program here), it will depend on msvcrxx.dll file (xx is the version number corresponding to different VC, VC2005 is 80, VC2008 is 90, VC2010 is 100), when the program is released, it is necessary to copy the corresponding dll, which is inconvenient.

By the following method, you can make exe not depend on these dlls (although the generated exe will be much larger)

Take the VC2010 English version as an example, switch to the Solution Explorer view, right-click on the project, select Properties, Configuration option, select Release, click Configuration Properties->C/C++->Code Generation->Runtime Library, select /MT . Rebuild the project in Release mode, and generate exe files that do not depend on msvcr100.dll in the Release folder.

The following briefly explains the meaning of the four options of the Runtime Library:
(D for Dll and d for debug version)

MT (Multi-threaded): multi-threaded version
MTd (Multi-threaded debug): multi-threaded debug version
MD (Multi-threaded Dll): Multi-threaded Dll version
MDd (Multi-threaded debug debug): multi-threaded debugging Dll version