views:

40

answers:

3

I have a legacy msvs2005 c++ project library (dll). I opened project on WindowsXP workstation with msvs2008 installed and code compiled fine. But when I try to use it with executable module i observe "my-library.dll or one of it's dependencies were not found".

Dependency Walker tells me that MSVCP80.DLL, MSVCR80.DLL, MSVCR90D.DLL are missed. MSJAVA.DLL is missed also. I installed 2008 Visual C++ redistributable package but the problem remains. Required libraries were not put into System32 folder.

What shall I install on workstation or what shall I trick in project configuration to avoid this problem?

Thank you in advance!

+1  A: 

You should install either the Visual C++ 2005 Redistributable Package or the Visual C++ 2005 SP1 Redistributable Package, since your legacy code was compiled with Visual Studio 2005 (8.0).

Use the SP1 redistributable if the code was compiled with VS 2005 SP1.

Frédéric Hamidi
Thank you Frederic, but since I imported it into MSVS2008, may be recompilation is enough?
Andrew Florko
It's clearly looking for the 8.0 runtime, i.e. VS 2005. Your legacy library might depend on another external library that requires that runtime.
Frédéric Hamidi
+1  A: 

installed 2008 Visual C++ redistributable package but the problem remains.

Where did you get the redist from?

There are a variety of versions of the redist, the one that comes with MSVC is most likely to be the appropriate one. There are however a bunch of things that happened such as ATL security updates and such so what you need to look at is the version number info which would be present in the manifest, then find the right version (or newer) to install.

Also take care that you would need the debug redist if you wish to use the debug build of the library on another machine.

Greg Domjan
+1  A: 

As a repeat victim of Side-by-side assemblies since that unholy horror was unleashed some years ago, I've had to deal with this on a regular basis. @Frederic is right that installing the redistributable with your installer is ideal but you may have other issues as well.

That said, if you have access to a Vista/Windows7 machine you can use sxstrace. It's an unintuitive tool for tracking down these problems. You can use the information that's generated using that tool to figure out exactly what your app is looking for.

  1. Run this on the command-line

    sxstrace.exe -logfile:sxstrace.st

  2. Now start the app and get the error

  3. Now click enter to stop the trace
  4. Now enter:

    sxstrace parse -logfile:sxstrace.st -outfile:sxstrace.txt

  5. Now you can look at the output file and see exactly what happened when the app was run.

Source: http://blogs.msdn.com/b/junfeng/archive/2006/04/14/576314.aspx

Also, you may want to take a look at this article on msdn as it helps with troubleshooting these problems: http://msdn.microsoft.com/en-us/library/ms235342(VS.80).aspx

Karim