I know that there are some questions about how to include msvcr120.dll/msvcp120.dll into your project.
But I want to drop that dependency. I compile the program in Release version, in Visual Studio 2013. I do not depend on any VS-specific commands (#pragma
etc.) or precompiled headers etc.
I want to compile it to one single release .exe and provide it to user WITHOUT demanding him to install VC++ Redistributes for VS (the user will be working on Windows 7, Windows 8, maybe Windows XP).
Is that possible? If so, how?
#pragma
and most VS specific commands don't depend on the msvcr. Having globals depends on the c++ runtime. It's also the thing that calls main. You need that code. However, as drescherjm says, you can embed that lib code in your exe (via the/MT
or/MTd
option), and then you don't need a seperate dll file. - Mooing Duck