简体   繁体   English

如何在 windows10 上的大量 static 库文件中找到符号的定义位置?

[英]How do I find where a symbol is defined in lots of static library file on windows10?

I am trying to complie a project.我正在尝试编译一个项目。 The linker throw me an error that the external symbols is unsolved. linker 给我一个错误,即外部符号未解决。

I understand that I should tell the linker where the.lib file is to deal with this problem.我知道我应该告诉linker .lib 文件在哪里来处理这个问题。 But how can I find what exactly the.lib file is to link with my code, from quite a lot of.lib files.但是我怎样才能从相当多的 .lib 文件中找到与我的代码链接的 .lib 文件到底是什么。

I search for solution but all assume compiling on Linux OS, though I actually compile my code on windows10 with visual studio 2019....T _ T.....我寻找解决方案,但都假设在 Linux 操作系统上编译,尽管我实际上是在 windows10 上使用 Visual Studio 2019 编译我的代码......T _ T......

Maybe I can seaerch for the.lib file by the decorated symbol也许我可以通过装饰符号搜索.lib 文件

__imp_?GetOutputPort@vtkAlgorithm@@QEAAPEAVvtkAlgorithmOutput@@XZ

but I don't know how to do....但我不知道该怎么做......

Use the dumpbin command of VS to view the dll dependencies of the target program.使用VS的dumpbin命令查看目标程序的dll依赖。 The usage method is as follows:使用方法如下:

Start -> All apps -> Microsoft Visual Studio 20XX -> Developer Command Prompt for VS 20XX, where XX represents your VS version, I am using VS2022.开始 -> 所有应用 -> Microsoft Visual Studio 20XX -> Developer Command Prompt for VS 20XX,其中 XX 代表你的 VS 版本,我使用的是 VS2022。

Enter: >dumpbin /dependents FilePath:\xxx.exe输入: >dumpbin /dependents FilePath:\xxx.exe

Here is my example for your reference.(I hide my file paths and dynamic libraries.)这是我的示例供您参考。(我隐藏了我的文件路径和动态库。)

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM