-->

What is the equivalent of Linux's ldd on windo

2019-01-30 22:05发布

问题:

What is the equivalent of Linux's ldd on windows?

回答1:

Here is Dependency Walker.

http://dependencywalker.com/



回答2:

or the GNU tool :

i586-mingw32msvc-objdump -p  *.exe    | grep 'DLL Name:'


回答3:

The dumpbin command can be useful for many things, although in this case dependency walker is probably a little more verbose.

dumpbin /dependents some.dll


回答4:

PowerShell can do this

PS > Start-Process -PassThru calc.exe | Get-Process -Module

   Size(K) ModuleName
   ------- ----------
       908 calc.exe
      1700 ntdll.dll
      1148 kernel32.dll
       432 KERNELBASE.dll
     13856 SHELL32.dll
           ...


回答5:

If you're using wine and not real Windows, you can use WINEDEBUG=+loaddll wine <program>.



回答6:

There is now an ldd in Cygwin. If you have a very old Cygwin version, you will have to use cygcheck.



回答7:

I guess the Windows Developer way to do this is to use dumpbin /dependents source.exe. If you have Visual Studio installed you can find it here: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe.



回答8:

Newer versions of Git on Windows come packaged with something called Git BASH, which emulates many useful Unix commands including ldd.

It appears that it reports only libraries that can be found. So you can use this to get an overview of where the used libraries are located, but not which are missing.