0

I want to run my console app C++ project on system that hasn't got any c++ related compilers or libraries.

Whenever I run it I got an error.

"The program can't start because MSVCP110D.dll is missing from your computer. Try reinstalling the problem to fix this problem."

I believe it is because I have used library in my program. to utilize stoi function.

If that's the case, how can I add & use this library within my project. if not what are the alternatives ?

It a simple program that uses following libraries to read & write files.

#include <iostream> 
#include <fstream> 
#include <string>

I built this project using Visual Studio 2012.

The system that am gonna be running this project on uses win7.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
Daniyal Nasir
  • 669
  • 7
  • 22
  • 1
    I have not tried it, but `static linking` should be able to solve the problem. This post should be helpful: http://www.codeproject.com/Articles/85391/Microsoft-Visual-C-Static-and-Dynamic-Libraries – aniliitb10 Aug 29 '15 at 16:00
  • You are compiling a **Debug** configuration. MSVCP110D.dll is not a redistributable. You need to deploy a **Release** configuration, that links against MSVCP110.dll. That is a redistributable, that you need to ship alongside your application. – IInspectable Aug 30 '15 at 20:20
  • @user2079303: The proposed duplicate isn't. It answers the follow-up question on how to get MSVCP110.dll on the target machine. It doesn't answer this question, which is about MSVCP110D.dll. I would suggest you revoked your close-vote. – IInspectable Aug 31 '15 at 06:48
  • @IInspectable that question answers how to statically link the standard library in VS, which is how you can build a c++ program that depends on standard library but can be run on a system that hasn't got the library dll. Which is what OP is asking. – eerorika Aug 31 '15 at 07:50
  • @user2079303: No, it isn't. The OP is asking, why the **Debug** configuration of the CRT is not on the target machine. And the answer is: Because it isn't redistributable. Statically linking against the Debug configuration doesn't solve the issue: This is against the license agreement. – IInspectable Aug 31 '15 at 07:58
  • @IInspectable I see, good point. I didn't know about the difference with license of debug and release. – eerorika Aug 31 '15 at 08:03
  • Guys Guys !! I have solved the problem by walking through the steps present in this link. https://msdn.microsoft.com/en-us/library/wx0123s5.aspx Thanks to @ThomasMatthew – Daniyal Nasir Sep 01 '15 at 12:52

1 Answers1

0

Build the program in Release mode.

Tell your client / customer to download the MSVCP110.dll file. Or the "runtime support" files.

Or you use Visual Studio's installer to create an installation file (using a Release mode executable).

Debug mode executables were not meant to be delivered as a final product. The suffix "D" in "MSVCP110D.DLL" means debug.

Thomas Matthews
  • 56,849
  • 17
  • 98
  • 154
  • Can you help with the, how to get a release mode executable file that you're referring to. or a link where I can get this MSVCP110.dll file / "runtime support" files. Since its my first time deploying any project. – Daniyal Nasir Aug 31 '15 at 05:45
  • @DaniyalNasir: [How to: Set Debug and Release Configurations](https://msdn.microsoft.com/en-us/library/wx0123s5.aspx). Stop being helpless. – IInspectable Aug 31 '15 at 06:51
  • Thanks mate , THIS LINK DOES SOLVE MY PROBLEM.. – Daniyal Nasir Sep 01 '15 at 12:52