How to list definitions exported by Visual C++ library file

On Windows, library files (.lib) are commonly produced by compilation using the Visual C++ compiler. Sometimes, you may want to know which library file exports the definition of a certain function or global variable.

The definitions exported by a library file can be listed by using the dumpbin tool. This ships with Visual Studio and can be invoked by opening the Developer Command Prompt for Visual Studio.

To list the symbols exported by a library file use:

C:\> dumpbin /exports foo.lib

Note that C function definitions will have an underscore as prefix. But, C++ definitions will be much more mangled. However, if you know the function name or even a substring of it, you could investigate using the output of this program.

Tried with: Visual Studio 2012 and Windows 7 x64

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.