How to leave Visual Studio 2013 dlls dependencies behind?

c++, visual-studio-2013

Solution

Try to set `/MT` for Release and `/MTd` for Debug in `Project Settings->C/C++->Code Generation`. This will make your program not dependent on Visual Studio libraries. But beware that all the libraries/ projects you will link with should also have the same option there, otherwise you'll get nasty linker errors.

You may also wish to select `v120_xp` in `General->Platform Toolset` for your program to be able to run on Windows XP

Problem

My application when opened in others computer will give an error missing msvcr"something".dll, I found out that to fix this they need to install the following: http://www.microsoft.com/en-us/download/details.aspx?id=40784 Which is Visual C++ Redistributable Packages for Visual Studio 2013. I would like to compile the program with the dlls in the executable already, is such thing possible? If not possible, where can I get all the dlls to put in the compiled project folder?

Original source

Related problems