This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(10)
dumpbin 命令对于很多事情都很有用,尽管在这种情况下依赖遍历器可能会更冗长一些。
输出示例:
The
dumpbin
command can be useful for many things, although in this case dependency walker is probably a little more verbose.Example output:
这是 Dependency Walker。
http://dependencywalker.com/
Here is Dependency Walker.
http://dependencywalker.com/
或 GNU 工具:
or the GNU tool :
如果您使用的是
wine
而不是真正的 Windows,则可以使用WINEDEBUG=+loaddll wine
。If you're using
wine
and not real Windows, you can useWINEDEBUG=+loaddll wine <program>
.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.
Cygwin 中现在有一个
ldd
。如果您的 Cygwin 版本非常旧,则必须使用 cygcheck。There is now an
ldd
in Cygwin. If you have a very old Cygwin version, you will have to usecygcheck
.我猜 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
.对于 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
对于 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
在 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/