0

I just started learning C++, and I made a simple program I want to send to my friend so he can see it.

I send him the .exe in release mode, and it STILL gives the "MSVCP110D.dll is missing" error.

I don't know what else to do, I've tried everything.

Any ideas?

user2415558
  • 1
  • 1
  • 1
  • possible duplicate of [Visual C++ executable and missing MSVCR100d.dll](http://stackoverflow.com/questions/10406807/visual-c-executable-and-missing-msvcr100d-dll) (also see the second section of [this answer](http://stackoverflow.com/questions/6794434/remote-debugging-an-app-with-the-debug-versions-of-the-crt-when-vs-is-not-instal/6794503#6794503) for instructions) – Cody Gray - on strike May 24 '13 at 04:30

4 Answers4

5

The D in MSVCP110D.dll means you gave him a debug build. Don't do that. Compile your program as Release. If it still doesn't work, he need the Visual C++ Runtime for the correct version of Visual Studio you used to comile.

EClaesson
  • 1,568
  • 2
  • 15
  • 26
2

You can build your program with static MFC library.

SolutionExplorer->Project->mouse right click->Properties->General->Use of MFC = "Use MFC in a Static Library".

Then you can send the .exe to your friend without any dependency problem.

Roy
  • 21
  • 2
1

You can link Runtime library statically, so you won't need Redistributable package to be installed. VS project properties

(for debug configuration choose "Multi-threaded Debug (/MTd)")

n0rd
  • 11,850
  • 5
  • 35
  • 56
0

Another way is to link to a static, not a dynamic library. This way your executable will become significantly larger, however it will not require the C++ runtime DLL to be present on his machine at all. See Project → Properties → Configuration Properties → C/C++ → Code Generation → Runtime Library → choose "Multi-threaded (/MT)".

heap underrun
  • 1,846
  • 1
  • 18
  • 22