Dependency Walker -- A remedy for distribution headaches

From assela Pathirana
Jump to navigationJump to search

If you have ever tried to give away a reasonably complicated program that was written and compiled on windows to another user you should be very familiar with complaints of missing DLLs, and other dependencies and module mismatches etc., etc. These erros can manifest themselves in many forms (The procedure entry point could not be located in the dynamic link library; The application or DLL is not a valid Windows image or even Program too big to fit in memory.) This is particularly so if you happen to be developing with a complex build environment that is tightly integrated with windows system, like visual studio (I often use Visual C++ 2005/2008 express (a.k.a. free) editions and they create a lot of trouble in deployment!)

Sometimes it is possible to solve these issues by trial and error: Try running the program in a new computer and try including the needed DLL files (remember: Some DLL files are not freely distributable due to licensing restrictions, so check carefully) that the program complains missing, one by one. But, for a fairly complex program this can sometimes be quite tiring path to follow. The Dependency Walker is a program that can help making the figuring out of dependencies, a fairly smooth and fast task.

Dependency Walker

Dependencies of a program

Simply put, Dependency Walker is a utility that scans any windows application (or any other module like a DLL) and builds a list of all dependent modules. It recursively scans each of the dependent modules in tern to see their dependencies. For example when I opened one of the programs written in C++ and compiled using visual C++ 2008 express edition with dependency walker, it showed the dependencies shown on the figure in right.