12

Possible Duplicate:
Application has failed to start because MSVCP100D.dll was not found, reinstalling app may help…

I compiled my program using Microsoft visual C++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler.

As I double clicked it, and there was message saying MSVCP100D.dll file was found missing.

  • What sort of file is this?
  • Why did the application fail to start?
  • What can I do to start the application there?
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328

3 Answers3

15

This is the C++ runtime library dll. You've used the debug version, which won't be found in a user's computer. Compile your program in release mode. This will add a dependency in MSVCP100.dll, which is most likely to be present.

In any case, you must make sure that the dll will be present in user's machine. You can do that by creating an installer or by prompting the user to install the Microsoft Visual C++ 2010 Redistributable Package.

In summary:

  • Compile your code in release mode
  • Create an installer or use another way to copy the needed dlls to user's machine
kgiannakakis
  • 103,016
  • 27
  • 158
  • 194
  • 3
    How about actually *installing* the dependency, rather than just switching to a slightly less uncommon dependency, and praying that someone else installed that for you? – jalf Jul 05 '11 at 09:56
  • Visual C++ express can't create installer packages, so the only option is linking to VC++ 2010 redistributable package: http://www.microsoft.com/download/en/details.aspx?id=5555 – blaze Jul 05 '11 at 10:52
  • @jalf msvcp100d.dll as all other d dlls (from VS) are not supposed to be redistributed, unless you wish to debug the process on the target pc. The MS recommended way is to compile in release mode and install the vcredist.exe for your runtime component. In this case the 2010. – RedX Jul 05 '11 at 10:54
  • @RedX: You missed my point: Switching to release mode, as @kgiannakakis suggested, *does not solve the problem reliably*. Regardless of what your dependencies are, you need to ensure that they exist on the target machine. – jalf Jul 05 '11 at 11:57
  • 1
    @jalf your post, at least to me, suggested delivering the debug version. I just wanted to clarify that the recommended way is to use release mode and the vcredist. – RedX Jul 05 '11 at 13:32
  • @jalf You are correct that one needs to make sure that all dependencies can be found in user's machine. I've edited my answer. – kgiannakakis Jul 05 '11 at 14:07
  • @ kgiannakakis what do you mean by `creating an installer ?` – Suhail Gupta Jul 06 '11 at 03:44
  • An installer is a .exe or a .msi program that copies your executable and all required dlls to a user's machine. – kgiannakakis Jul 06 '11 at 06:59
  • The real solution is to compile in Release mode *and* distribute the VC++ 2010 redistributable package. Neither one is sufficient on its own. – Cody Gray - on strike Jul 07 '11 at 08:29
2

What about statically linking your program instead? I have done this in order to avoid this hassle (of either creating an installer, or asking a user to install another package and having to point/handhod them in that direction)

Daniel Chisholm
  • 566
  • 5
  • 16
1

I guess you have to download and install the redistribution package from here to install the runtime environment necessary for your compiled code.

This DLL contains extra functions, which are linked when you run the program. If this DLL is not present, you receive the error message you are experiencing.

Constantinius
  • 34,183
  • 8
  • 77
  • 85