How to check for DLL dependency?

orlp picture orlp · Sep 11, 2011 · Viewed 264.6k times · Source

Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't work" because "some DLL" is missing. This is of course because the program can find the DLL on my system, but not on theirs.

Is there a way to scan an executable for DLL dependencies or execute the program in a "clean" DLL-free environment for testing to prevent these oops situations?

Answer

JeffRSon picture JeffRSon · Feb 3, 2015

dumpbin from Visual Studio tools (VC\bin folder) can help here:

dumpbin /dependents your_dll_file.dll