Windows 上 Linux 的 ldd 相当于什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1993673/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the equivalent of Linux's ldd on windows?
提问by WilliamKF
What is the equivalent of Linux's ldd
on Windows?
什么是 Linuxldd
在 Windows 上的等价物?
采纳答案by Daniel A. White
Here is Dependency Walker.
这是 Dependency Walker。
回答by David St Denis
The dumpbin
command can be useful for many things, although in this case dependency walker is probably a little more verbose.
该dumpbin
命令对很多事情都有用,尽管在这种情况下,dependency walker 可能有点冗长。
dumpbin /dependents some.dll
Example output:
示例输出:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Static Analysis Tools>dumpbin /dependents StanPolicy.dll
Dump of file StanPolicy.dll
File Type: DLL
Image has the following dependencies:
mscoree.dll
Summary
2000 .reloc 2000 .rsrc 1E000 .text
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Team Tools\Static Analysis Tools>dumpbin /dependents StanPolicy.dll
文件 StanPolicy.dll 的转储
文件类型:DLL
图像具有以下依赖项:
mscoree.dll
概括
2000 .reloc 2000 .rsrc 1E000 .text
回答by RzR
or the GNU tool :
或 GNU 工具:
i586-mingw32msvc-objdump -p *.exe | grep 'DLL Name:'
回答by Steven Penny
PowerShell can do this
PowerShell 可以做到这一点
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 ...
回答by Janus Troelsen
If you're using wine
and not real Windows, you can use WINEDEBUG=+loaddll wine <program>
.
如果您使用的wine
不是真正的 Windows,则可以使用WINEDEBUG=+loaddll wine <program>
.
回答by Janus Troelsen
There is now an ldd
in Cygwin. If you have a very old Cygwin version, you will have to use cygcheck
.
现在ldd
在 Cygwin 中有一个。如果您有一个非常旧的 Cygwin 版本,则必须使用cygcheck
.
回答by JohnnyFromBF
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
.
我猜 Windows 开发人员的方法是使用dumpbin /dependents source.exe
. 如果你安装了 Visual Studio,你可以在这里找到它:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe
.
回答by Machta
Newer versions of Git on Windows come packaged with something called Git BASH, which emulates many useful Unix commands including ldd.
Windows 上较新版本的 Git 打包了一个叫做Git BASH 的东西,它模拟了许多有用的 Unix 命令,包括 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.
它似乎只报告可以找到的库。因此,您可以使用它来概览使用的库所在的位置,而不是缺少哪些库。