主要有如下幾種方法,根據IDE環境或者已裝軟件,靈活選用相關工具。推薦方法3和方法4。
- 安裝 Visual Studio,加載 "Developer Command Prompt for VS 2017",使用 dumpbin 工具
dumpbin /dependents your_dll_file.dll
- 安裝 Cygwin,打開 Cygwin Terminal,可以運行 linux 指令
ldd your_dll_file.dll
參考鏈接:https://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency
- 安裝 git bash ,直接可以使用linux ldd指令。
ldd your_dll_file.dll
-
利用 windows API 實現linux ldd 功能,下載 ldd_win,將可執行程序添加到環境變量中,就可以系統終端中調用 ldd finename 查看依賴。
Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules. For each module found, it lists all the functions that are exported by that module, and which of those functions are actually being called by other modules. Another view displays the minimum set of required files, along with detailed information about each file including a full path to the file, base address, version numbers, machine type, debug information, and more.

