Microsoft equivalent of the nm command

南楼画角 提交于 2019-11-26 10:58:15

问题


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.


回答1:


Try dumpbin.exe.

MSDN dumpbin.exe reference.




回答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.



来源:https://stackoverflow.com/questions/375273/microsoft-equivalent-of-the-nm-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!