views:

13260

answers:

11

Hello,

I have a problem with Visual C++ 2008. I have installed opencv and I've created a new program and I build it with no errors. However, it complains about not finding MSVCR90D.dll when debugging. In release mode there is no problem at all.

I do have MSVCR90D.dll in one of Winsxs folders. Does anyone know a get-around to this problem? Is this a known bug?

Gerard

+4  A: 

There are several potential solutions described in this forum post. See if any of those help.

One hint from there:

Go to %System Drive%\Windows\WinSxS and look for the directory x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456

If this doesn't exist, go to the VS setup and make sure you have all libraries installed under VC++.

And another one:

I had the same problem, but fixed it by turning off incremental linking (Project properties... Linker... General... Enable Incremental Linking: No).

Confirming the last one:

Projects built on a software-mounted drive complain about a missing MSVCR90D.dll. The problem goes away if you turn off incremental linking (and rebuild all, of course).

smink
Thank you very much for your help. It worked!! However, can I have any problem for setting off the incremental linking? What difference does it make?Thank you again
From MSDN: An incrementally linked program is functionally equivalent to a program that is nonincrementally linked. This is the important point. Read more at http://msdn.microsoft.com/en-us/library/4khtbfyf(VS.80).aspx.
smink
Turned off incremental linking (OGRE3D) and it worked. Thanks +1
Brock Woolf
A: 

This is one of the reasons that I statically link; bigger EXEs but I have never had a dependency issue like this before. Probably worth a question in itself though...

Rob
"Probably worth a question in itself though" While I disagree on the viewpoint you expressed, I agree fully with your conclusion... ^_^
paercebal
+1  A: 

Troublehooting DLL problems is a lot easier with Dependency Walker . It allows you to profile your application, catching both DLLs loaded at startup and DLLs loaded later. It will spit out a lot of messages related to the loading of DLLs, or the failure to load them. It also understands SxS loading of DLLs.

You can pass an EXE as a argument to Depends.EXE, and it will profile that app. This can be combined with most IDEs. For instance, in Visual Studio you can set the "Command for Debugging". By default, that's your own EXE. Change it to depends.EXE, and set the command arguments to (at least) /pb your.debug.exe.

MSalters
A: 

hello buddies even i had the same prob missing msvcr90d.dll... and i did switch tat incremental linking to off..and it did wrk out.

but i want to know what this incremental linking is all about????

will i face any prob regardin this by switchin it offf,in what cases it would be a prob

kindly help me out!!!!!!!!!!!!

+2  A: 

Having the same problem I found a post that lead me to the debug DLLs in the VS9.0 install. For the default install they were in: C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\Debug_NonRedist\x86\Microsoft.VC90.DebugCRT.

There are three DLLs and a manifest file. You can add these to your System32 directory, add the directory to your PATH environment variable or copy the files to same directory as your executable when debugging.

Incremental linking speeds up your builds (the linker only re-links libs that have changed instead of re-linking the entire project). It otherwise has no effect on the build output. For a large project I would not recommend turning off incremental linking.

x_x
This solution worked for me.
Donblas
A: 

None of given answers really gives answer to the question.

All of them point to different workarounds but don't explain the true cause of the error and how to fix it. Hoping for the wright answer I asked this question again here.

Piotr Dobrogost
A: 

I can't give a definitive solution, but here are some helpful links:

And of course, there's a lot more on MSDN if you follow the links.

Adam Rosenfield
A: 

I had the problem:

Could not load file or assembly 'AudioInterface, Version=1.0.3548.29920, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

AudioInterface was the name of my C++ project.

Switching to "Release" config, everything worked.

I tracked it to lack of the manifest file alongside my DLL, which I further tracked to having an Assembly Identity set. (Properties > Manifest Tool > General > Assembly Identity)

I removed this setting, and the manifest dropped in the right place, and everything worked.

dcb
A: 

Had the same problem although another VC9.0 project did well. So I compared both project settings. The crucial difference was under 'Project Properties' -> 'Configuration Properties' -> 'Manifest Tool' -> 'Input and Output' -> 'Embed Manifest'. This option must be set to YES.

Markus
A: 

I tried all the suggested solutions without any luck. I finally found that the manifest was missing from the "C:\WINDOWS\WinSxS\Manifests" folder.

Find the folder in C:\WINDOWS\WinSxS where your dll is located. Check to see if there is a manifest in C:\WINDOWS\WinSxS\Manifests that matches the folder name of your dll. If the manifest is missing, copy the correct manifest from another machine and paste it into the manifest folder. The manifest file names are:

"x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456.cat"

"x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456.manifest"

opie
A: 

Recompile your project in VC++ 2008 using function File->New->Project From Existing Code. It helped myself, probably it will help you. Regards.