Monday, July 21, 2014

Useful tool (Dependency Walker) to troubleshoot a DLL's missing dependencies

When using external or third party dynamic link libraries (DLL) such as liblas in your development, sometimes those libraries depend on other files or assemblies and when they cannot be found in the current location or in the system path, your program may throw up some run time errors. I found a nice time saving tool called the Dependency Walker (http://www.dependencywalker.com/) which can help troubleshoot the missing files of a DLL.

Using the tool is easy - just download and extract into a folder, then run the depends.exe file. The depends application window will pop up.

The following steps show an example of using this tool to identify the dependencies of my liblas1.dll.

  1. Drag and drop the file for analysis into the Dependency Walker application window.

    An error message may pop up.

  2. Press OK.
  3. Review the Module pane for the missing files. If possible, locate and copy the missing files to the location of the DLL.


  4. Select File | Close.
  5. Repeat step 1 to 3 until the errors no longer appear. 

No comments: