Windows 上 Linux 的 ldd 相当于什么?

发布于 2024-08-16 19:28:31 字数 1549 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

奢华的一滴泪 2024-08-23 19:28:31

dumpbin 命令对于很多事情都很有用,尽管在这种情况下依赖遍历器可能会更冗长一些。

dumpbin /dependents some.dll

输出示例:

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.文本

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

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
下雨或天晴 2024-08-23 19:28:31

这是 Dependency Walker。

http://dependencywalker.com/

Here is Dependency Walker.

http://dependencywalker.com/

甜警司 2024-08-23 19:28:31

或 GNU 工具:

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

or the GNU tool :

i586-mingw32msvc-objdump -p  *.exe    | grep 'DLL Name:'
沐歌 2024-08-23 19:28:31

如果您使用的是 wine 而不是真正的 Windows,则可以使用 WINEDEBUG=+loaddll wine

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

羞稚 2024-08-23 19:28:31

Windows 上较新版本的 Git 附带了名为 Git BASH 的东西,它模拟许多有用的 Unix 命令,包括 ldd。

它似乎只报告可以找到的库。因此,您可以使用它来概述所使用的库的位置,而不是缺少哪些库。

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.

银河中√捞星星 2024-08-23 19:28:31

Cygwin 中现在有一个ldd。如果您的 Cygwin 版本非常旧,则必须使用 cygcheck。

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

野の 2024-08-23 19:28:31

我猜 Windows 开发人员执行此操作的方法是使用 dumpbin /dependents source.exe 。如果您安装了 Visual Studio,可以在此处找到它:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\dumpbin.exe

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.

当爱已成负担 2024-08-23 19:28:31

对于 Windows 10,您可以使用 Dependencies - 开源现代 Dependency Walker

https://github.com/lucasg/Dependency< /a>

For Windows 10 you can use Dependencies - An open-source modern Dependency Walker

https://github.com/lucasg/Dependencies

卷耳 2024-08-23 19:28:31

对于 Windows 10,使用 Visual Studio 2017,我进入 Windows 的搜索栏并输入:

“VS 2017 的开发人员命令提示符”(Visual Studio 开发人员的特殊 cmd.exe)

这允许访问应该使用的 DUMPBIN带有 /IMPORTS 标签。例如,在正确的目录中:

DUMPBIN /IMPORTS yourfile.exe(其他扩展名也可能有效)

对于我来说,这列出了 DLL 和使用的函数。

或者,您可以使用更详细的标签 \ALL。

请参阅 microsoft 对 DUMPBIN 的解释:

https ://learn.microsoft.com/en-us/cpp/build/reference/imports-dumpbin?view=vs-2019

命令返回内容示例(仅部分)

For windows 10, with visual studio 2017, I go in the search bar of windows and type:

"developer Command Prompt for VS 2017" ( a special cmd.exe for Visual studio developer)

This allows to get access to DUMPBIN that should be used with the /IMPORTS tag. For example, in the correct directory:

DUMPBIN /IMPORTS yourfile.exe (others extension may work too)

For me, this list the DLL and the functions used.

Alternatively, you can use the tag \ALL that is much more verbose.

see the microsoft explanation of DUMPBIN:

https://learn.microsoft.com/en-us/cpp/build/reference/imports-dumpbin?view=vs-2019

Example ( with only a part) of the content sended back by the command

梦里°也失望 2024-08-23 19:28:31

在 Windows 上,我使用 cmder 作为大多数事情的终端(而不是 powershell/pwsh)。对于cmder,您只需输入“ldd my_executable.exe”,您就会看到预期的输出。

下载cmder的链接:https://cmder.net/

On Windows I use the cmder as terminal for most things (and not powershell/pwsh). For cmder you can simply type "ldd my_executable.exe" and you will see the expected output.

Link to download cmder: https://cmder.net/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文