rycander
rycander

Reputation: 37

Release .exe for vs2012 c++ requesting MSVCR110.dll

I'm attempting to compile a release executable using vs2012 Express. However, whenever I try to run the .exe on other computers, I get a warning that I need msvcr110.dll. I could simply copy the dll over, but I'm looking for a more long term solution.

In my attempts to isolate what is causing the error, I have reverted back to a new c++ project using the default settings, except for changing the configuration to release in the configuration manager.

I've been trying to solve this on my own for over a week now without any progress, so any suggestions would be appreciated.

Upvotes: 3

Views: 4946

Answers (3)

CodeFox
CodeFox

Reputation: 3502

For dynamically linked applications, the Visual C++ Redistributable for Visual Studio 2012 must be installed in target machines. Be sure to choose the architecture that matches your application.

Statically linking will obviously work, too, but I tend to classify this as a workaround.

Upvotes: 0

john
john

Reputation: 87959

In your project properties choose option Configuration Properties/C/C++/Code Generation/Runtime Library and pick option 'Multi-threaded (/MT)' (or 'Multi-threaded Debug (/MTd)' for your debug configuration).

Upvotes: 1

selbie
selbie

Reputation: 104514

Link to the CRT statically. Choose "Multithreaded", and not the DLL option in the Runtime Library dropdown in the project properties.

Upvotes: 5

Related Questions