Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSVC list symbols inside a static .lib file

Is there a command line tool that I can use (or comes with) Visual Studio that will print the names of the symbols inside a C++ static lib file in a simple and easy to parse format?

like image 354
kvanbere Avatar asked Apr 04 '13 08:04

kvanbere


People also ask

Do static libraries have symbols?

At link time, a static library can have unresolved symbols in it, as long as you don't need the unresolved symbols, and you don't need any symbol that is in a .o file that contains an unresolved symbol.

What are the information available inside the .LIB file?

lib file contains all the code and data for the library. The linker then identifies the bits it needs and puts them in the final executable. For a dynamic library, the . lib file contains a list of the exported functions and data elements from the library, and information about which DLL they came from.


1 Answers

There is the dumpbin.exe tool included with MSVC, which you can use.

For example to display all information about the library:

dumpbin.exe /ALL yourlib.lib

See MSDN for reference.

like image 87
bash.d Avatar answered Oct 22 '22 10:10

bash.d