How can I view the list of symbols available in a library?

Raymond Chen

When investigating unresolved external symbols, you may end up digging into library files to find out why a library doesn’t contain a symbol you expect it to.

The command for listing the symbols exported by a library is dumpbin /linkermember.

dumpbin /linkermember mystery.lib

By default, /linkermember lists all the symbols twice, once in object order (the order in which they appear in the library), and again in alphabetical order. You can ask for just the alphabetical one by saying /linkermember:2.

The list of exported symbols tends to be quite large, so if you’re looking for just one symbol, you probably want to grep it out.

dumpbin /linkermember:2 libcmt.lib | findstr /i printf

Note that the names are printed raw, with no undecorating.

Bonus chatter: The DUMPBIN program is really just a wrapper. All it does is run LINK.EXE with the /DUMP command line option, followed by whatever options you passed to DUMPBIN. If you want, you can just go directly to LINK.EXE:

link /dump /linkermember mystery.lib

5 comments

Discussion is closed. Login to edit/delete existing comments.


Newest
Newest
Popular
Oldest
  • Dimiter Stanev 0

    While dumpbin is useful, I find having `nm` (like llvm-nm on Windows) more practical. As long as you not working with LTCG symbols, it’ll read most (if not all of it).

  • 承昊 周 0

    please Support ASPX page on .netcore.
    how many people are using razor-page?it is a html.
    i know very more persons are using ASPX-page. i don’t known why netcore not support aspx?
    design for using,not for designing.
    设计是为了用的,不是为了设计而设计的,更不是为了显得自己高明而设计的。

  • Paulo Pinto 0

    Dependency Walker is just as valuable as dumpbin if not more so, when investigating unresolved external symbols across dynamic libraries, yet there is nothing on the Windows SDK as alternative, and the old version hardly works on modern Windows versions.

    • Me Gusta 0

      While that kind of tool is useful for working out problems with runtime dependencies, the post itself isn’t about that.
      If you look at the sample commands, they end in a .lib extension. So this is about link time issues, dealing with LNK2001 and LNK2019.

    • Rob Conde 0

      I’m not sure what/if anything is missing wrt Dependency Walker, but this tool is a great alternative: https://github.com/lucasg/Dependencies

Feedback usabilla icon