Rodyland
Rodyland

Reputation: 558

Debug build can't find debug runtime DLLs

I have a Visual Studio 2008 (SP1) program, debug build, 32bit, that can't seem to find the debug runtime DLLs (multithreaded debug DLLs).

But the crazy thing is, depends.exe shows the requisite DLLs as being present (and also missing). It actually looks like it's trying to load those DLLs twice.

Below is a link to a screenshot from depends.exe showing what I'm talking about - analysing a library that is part of the solution.

When I launch the program, I get "The program can't start because MSVCP90D.dll is missing from your computer. Try reinstalling the program to fix this problem."

If I go into the sxs directory and copy the "missing" DLLs into the same directory as the binary, the program runs.

The application manifest specifies the correct DLL versions (as evidenced by them being found by depends.exe). I've checked the manifests of that version of the runtime, and to my untrained eye it looks legit.

The binary itself shows the same problem as the DLL examined in the linked image, but also with MSVCP90D.DLL missing (and yet present).

I've tried building with internal/external manifests, turning incremental linking off and on, as suggested elsewhere, all to no avail. I would try linking a non-DLL runtime, however the libraries I am using are shared across many tens of solutions, so changing the way they are built isn't really an option (unless of course that turns out to be the only solution due to a known issue that my googling didn't turn up).

I've tried running sxstrace, but most of the time the output is empty (!), when it isn't empty it shows no errors.

I tried using windbg, but got nowhere as I'm not particularly experienced with the tool and wasn't sure what I was looking for.

I'm running on 64bit windows 7. One of my early thoughts was that having VS2005, 2008 and 2010 all installed on my box was causing some weird issues, but I've found no evidence to support that supposition.

(PS. Looks like similar issue as msvcp90d.dll is missing msvcr90d.dll which as far as I can see didn't actually get solved, and also mentions C# - my project is pure C++).

PPS. Looks like similar issue as "application configuration is incorrect" and "side-by-side configuration is incorrect" running VS2008 64-bit debug build However that problem was related to 3rd party libraries and 64 bit builds.

In addition the "solution" to copy the "missing" DLLs manually from SxS to the bin directory (which as is mentioned above does the trick) is not a solution at all - at best it's a work-around.

Upvotes: 1

Views: 4106

Answers (2)

ars
ars

Reputation: 707

"Debug versions of an application are not redistributable and none of the debug versions of the various Visual C++ dynamic-link libraries (DLLs) are redistributable. Debug versions of an application and Visual C++ libraries can only be deployed to another computer internal to your development site for the sole purpose of debugging and testing your application on a computer that does not have Visual C++ 2005 installed."

Here is the topic on msdn about runing debug builds "Preparing a Test Machine To Run a Debug Executable" (solutions and examples are provided):

http://msdn.microsoft.com/en-us/library/aa985618(v=vs.90).aspx

You can choose your version of visual studio (from 2005 up to 2013).

Upvotes: 1

brian beuning
brian beuning

Reputation: 2862

The redisributable does not include the debug DLL files. You need to install Visual Studio to get them.

Upvotes: 4

Related Questions