在 windows 静态库中查找未定义的符号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2607193/
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
Finding undefined symbols in windows static lib
提问by Jay
Is there any way to find out the list of undefined symbols in windows static library compiled using VC6?
有什么办法可以找出使用VC6编译的windows静态库中未定义符号的列表?
I know the nm command will list all the symbols in linux and symbols with a tag of "U" can be identified as undefined. But, how to do it Windows?
我知道 nm 命令会列出 linux 中的所有符号,并且带有“U”标签的符号可以被识别为未定义。但是,Windows 怎么做呢?
回答by Hans Passant
You can use dumpbin.exe /symbols on the .lib file. That lists all the symbols used, the external ones have the "External" prefix.
您可以在 .lib 文件上使用 dumpbin.exe /symbols。这列出了所有使用的符号,外部符号具有“外部”前缀。
回答by Eddy Pronk
If you install binutils in Cygwin you have nm and it understands the object file format of VC6.
如果你在 Cygwin 中安装 binutils,你就有 nm 并且它理解 VC6 的目标文件格式。