Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Finding undefined symbols in windows static lib

Is there any way to find out the list of undefined symbols in windows static library compiled using VC6?

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?

like image 406
Jay Avatar asked Apr 09 '10 12:04

Jay


People also ask

How to find a missing symbol in a library?

The place to look for the symbol is where you downloaded the library's source: likely the developer of that library provides either the related source directly or some clues regarding where they get it from. For what it's worth, I use scripts ( exports and externs) to check for missing symbols in the programs which I maintain.

How do I find the source of a library symbol?

Because it is a library, you would not notice this until you attempt to run the program which uses this symbol. The place to look for the symbol is where you downloaded the library's source: likely the developer of that library provides either the related source directly or some clues regarding where they get it from.

How do I list the symbols defined in a binary?

Using nm, it is possible to list the symbols defined in a binary, and the --defined-only switch ignores undefined references. find $path -name \*.a -exec bash -c "nm --defined-only {} 2>/dev/null | grep $symbol && echo {}" \;


1 Answers

You can use dumpbin.exe /symbols on the .lib file. That lists all the symbols used, the external ones have the "External" prefix.

like image 161
Hans Passant Avatar answered Oct 20 '22 23:10

Hans Passant