views:

235

answers:

3

Hi there. I am trying to use a library (.dll) in my project. Everything seems to be set up fine. It all works in release mode. When I go debug on it, I get this darn error on startup:

ldr: ... application couldn't be initialized error (or similar, I translated it)

I learned that this has to do with manifest files. I fumbled around a bit, in the project settings, but nothing really worked / I couldn't get my head around it. The error persists.

Does anyone know a quick solution to this? I don't care if it is dirty.

I think I liked dll-Hell better than manifest-Hell!!

The solution: The wrong version of the .dlls got loaded. I didn't know that they were still lying around on the system. Depedency Walker is a great tool and set me on the right track. So I will accept this answer.

Thanks a lot!

A: 

Probably has something to do with dependent DLLs that are not available in debug mode (but are there in release mode). Make sure the debug DLLs you need are available (e.g. in the path).

Assaf Lavie
no, when dlls can't be found, there's a different error.
AndreasT
+1  A: 

I always use Dependancy Walker for debugging this sort of thing. It will tell you which dependencies your dll is missing.

Matt Warren
+1  A: 

Are you trying to run Debug-mode executables on a PC without Visual Studio installed? If so, you'll need to copy the Debug CRT DLLs onto it. See here: http://msdn.microsoft.com/en-us/library/aa985618(VS.80).aspx

RichieHindle
No. I wouldn't know how to run debug mode without visual studio installed :)
AndreasT