开发者

Missing DLL Problem

I have a C++ native application that was built under VS2005 (sp1),On machine A. (Debug Mode) Now,I need to run this application on a "clean" computer, Clean means it has no VS installed on. When i copy the runtime folder from machine A to the "clean" machine and try to activate the application it demands to reinstall the application. obviously missing DLLs are causing this problem cause on machine A the app works just fine, Is there any "clean" solution for this kind of problem besides gessing which DLLs are missin开发者_StackOverflow社区g ? maybe a smart tool or installer that indicates which DLLs are missing at the runtime ?

Thanks, Liran


To make this work I would download and install the Microsoft Visual C++ 2005 Redistributable package on the clean machine.

Then I would then create a release build of the application and copy that version to the clean machine.


You can use Dependeny Walker http://www.dependencywalker.com/ for finding the standard DLLs that it references, but I'm not sure if there is an easy way of finding out what COM DLLs an application references.

Alternatively (I am not sure), you can run your application on machine A (on which it was created) and use process viewer from http://www.sysinternals.com. It tells you what DLLs a process has loaded.


You have two options:

  1. Install "debug runtime" on the target "clean" computer
  2. In build option you may select "use CRT/MFC as static library"


When it tells you that some DLLs are missing, it should tell you which ones. Typically, you linked to the CRT dynamically, which means that you can just link to it statically and it should resolve the problem.


You could use a tool like ProcessExplorer to check which DLLs your program uses on the machine where it's working (Alternatively, the "Modules" window in VS or the "lm" command in WinDbg show the same information). Then check if every one of them can be found in the path on the "clean" machine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜