1

I have compiled my program with visual studio 2012 in debug version with shared runtime library option, but when I send my app to my friends, they have alert, that MSVCR110d.dll couldn't be found. This is strange, because I attached this file in the app root directory.

What could be the reason?

Charles
  • 50,943
  • 13
  • 104
  • 142
majakthecoder
  • 177
  • 3
  • 14
  • I fear the title of your question is wrong: you mean surely "MSVCR110d.dll couldn't be found although exists" ? – Leo Chapiro May 15 '13 at 14:34
  • yup, i changed the title – majakthecoder May 15 '13 at 14:45
  • 2
    Take a look at this answer: http://stackoverflow.com/a/10406852/1758762 HTH – Leo Chapiro May 15 '13 at 14:49
  • But this problem concerns situation, where application is compiled in release mode and it still requires debug version of runtime library. I have compiled my application in debug version. I don't want to force my friends to install redistributable libs. I think static linking is the solution, but I still want to know, what is the reason of my problem. – majakthecoder May 15 '13 at 14:54
  • 1
    Have you read this as well: ...More to the point, the debug version is not redistributable, so it's not as simple as "packaging" it with your executable, or zipping up those DLLs ? – Leo Chapiro May 15 '13 at 14:56
  • I didn't notice that. I think this is the reason. – majakthecoder May 15 '13 at 15:01

1 Answers1

3

As already explained here https://stackoverflow.com/a/10406852/1758762 ,

The debug version is not redistributable, so it's not as simple as "packaging" it with your executable, or zipping up those DLLs.

Check to be sure that you're compiling all components of your application in "release" mode, and that you're linking the correct version of the CRT and any other libraries you use (e.g., MFC, ATL, etc.).

You will, of course, require msvcr100.dll (note the absence of the d suffix) and some others if they are not already installed. Direct your friends to download the Visual C++ 2010 Redistributable (or x64), or include this with your application automatically by building an installer.

Community
  • 1
  • 1
Leo Chapiro
  • 13,678
  • 8
  • 61
  • 92