Remove dependency for msvcr120.dll/msvcp120.dll in release versions

I know that there are some questions about, how to include msvcr120.dll/msvcp120.dll into your project.

If you want to drop that dependency. If you compile the program in release version, in Visual Studio 2013/2015 and do not depend on any VS-specific commands (#pragma etc.) or precompiled headers etc.

If you want to compile it to one single release .exe and provide it to user WITHOUT demanding enduser to install VC++ Redistributes for VS

You can statically link the runtime to your project by setting the /MT flag. You can find this option in Visual Studio 2013/2015 under Project > [ProjectName] Properties… > Configuration Properties > C/C++ > Code Generation > Runtime Library. Make sure to only set it for the Release configuration.

 

Feel free to comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.