Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application has failed to start because MSVCP100D.dll was not found, reinstalling app may work

I googled on this and realized there are probably several causes to this so I will describe my scenario.

This happens when my application tries to load a .dll file built in another version of Visual Studio (2010), if I build the same project on Visual Studio 2008 the DLL file loads just fine...

I don't know if it matters, but Visual Studio 2010 DLL file version is built on Windows 7 x32, and Windows Vista 64-bit is on the other side with Visual Studio 2008.

like image 647
Marko29 Avatar asked Jan 12 '11 12:01

Marko29


3 Answers

If you link dynamically to the MSVC runtime then you need to install that runtime on every machine that will run your app.

Note that in this case you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime.

like image 141
David Heffernan Avatar answered Nov 05 '22 00:11

David Heffernan


If you do not want to distribute the runtime, then you can switch your Runtime Library options in Visual Studio (Properties -> C/C++ -> Code Generation -> Runtime Library) from /MD to /MT or from /MDd to /MTd.

As others have said, if you are distributing this application you should be linking dynamically or statically to the Release version of the Runtime library, not the Debug version.

like image 35
oob Avatar answered Nov 04 '22 22:11

oob


Just an small related advice: DON'T ADD any *248d.lib files while building and running in the RELEASE version.

I was following advice from different blogs, and I accidentally added both *248d.lib as well as the 248.lib files. Basically in LinkerInputAdd Dependencies, ensure that you don't have *248d.lib files in it (here 248 is version 2.4.8).

I spent hours wondering why things weren't working in the release mode until it struck me that there are two copies of .lib files, one *248 and other *248d. If you include any of the d files in release mode, you will get the DLL issue.

like image 2
user3046045 Avatar answered Nov 05 '22 00:11

user3046045