Window 下如何檢查 DLL 依賴(How to check for DLL dependency?)


主要有如下幾種方法,根據IDE環境或者已裝軟件,靈活選用相關工具。推薦方法3和方法4。

  1. 安裝 Visual Studio,加載 "Developer Command Prompt for VS 2017",使用 dumpbin 工具
dumpbin /dependents your_dll_file.dll
  1. 安裝 Cygwin,打開 Cygwin Terminal,可以運行 linux 指令
ldd your_dll_file.dll

參考鏈接:https://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency

  1. 安裝 git bash ,直接可以使用linux ldd指令。
ldd your_dll_file.dll
  1. 利用 windows API 實現linux ldd 功能,下載 ldd_win,將可執行程序添加到環境變量中,就可以系統終端中調用 ldd finename 查看依賴。

  2. http://dependencywalker.com/ 工具

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.

Dependency Walker 界面


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM