PolGraphic
PolGraphic

Reputation: 3364

Get rid of msvcr120.dll/msvcp120.dll dependency in my Release application (VC++ 2013)

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?

Upvotes: 8

Views: 8822

Answers (2)

Chris Vasselli
Chris Vasselli

Reputation: 13364

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

Upvotes: 12

drescherjm
drescherjm

Reputation: 10857

From the comments. To remove the requirement of possibly needing the redistributable you can build your application with the static runtime (/MT option) instead of either of the dynamic runtime choices.

Upvotes: 3

Related Questions