Microsoft equivalent of the nm command

25,148

Solution 1

Try dumpbin.exe.

MSDN dumpbin.exe reference.

Solution 2

  1. Run vcvarsall.bat which might present in your installed path of Microsoft Visual Studio. This sets environmental variable required for dumpbin.exe.

    D:>"D:\Program Files (x86)\Microsoft Visual Studio 10.0\vcvarsall.bat" x86

  2. Then use dumpbin.exe. For example dumpbin.exe /ALL <bin_file> gives all symbols.

Share:
25,148
David Norman
Author by

David Norman

Just another geek.

Updated on July 09, 2022

Comments

  • David Norman
    David Norman almost 2 years

    I've long used cygwin's nm command for all my .lib symbol debugging needs, but recently I thought about referring to it in a SO answer and realized that most Windows developers don't have cygwin installed.

    So what is the Microsoft equivalent to nm, i.e., what command will list the symbols exported by a .lib file, the undefined symbols in the .lib, and so forth?

    For the curious, a sample nm man page is here.

  • dothebart
    dothebart almost 6 years
    both links are dead :-(
  • dothebart
    dothebart almost 6 years
    yes, got it working. However, the MSDN documentation is next to worthless - a properly implemented --help argument could have superseeded it easily
  • Bob Jarvis - Слава Україні
    Bob Jarvis - Слава Україні over 5 years
    Microsoft has three levels of support - primary support, advanced support, and technical support. These can be summed up with three phrases: 1) No one has ever reported an issue like that before; 2) Why would you ever want to do that?; and 3) I'm-pissed-I've-got-to-talk-to-actual-users-so-I'm-going-to-‌​talk-real-fast-and-s‌​pout-code-like-a-fou‌​ntain-and-you'd-bett‌​er-get-it-all-down-t‌​he-first-time-becaus‌​e-I-will-NOT-repeat-‌​myself.