Under normal circumstances, when we use VC to compile an EXE for a console/Win32 ProjectProgram(The MFC program is not considered here), it will depend on msvcrxx. DLL file (XX is the version number corresponding to different VC, vc2005 is 80, vc2008 is 90, and vc2010 is 100). When you release a program, you need to copy the corresponding DLL, inconvenient.
By using the following method, you can make the EXE independent of these DLL (but the generated exe will be much larger)
Take the English version of vc2010 as an example. Switch to the Solution Explorer view, right-click the project, select properties, and select release in the configuration option, choose configuration Properties> C/C ++> code generation> Runtime Library and select/mt. Re-build the project in release mode and generate an EXE file that does not depend on msvcr100.dll in the release folder.
The following describes the meanings of the four Runtime Library options:
(D Indicates DLL, and D indicates Debug)
MT (multi-threaded): multi-threaded version
MTD (multi-threaded Debug): multi-thread debugging version
MD (multi-threaded DLL): multi-thread dll version
MDD (multi-threaded DLL Debug): multi-thread debugging dll version