static library v.s. import library on Windows platform

前端 未结 2 1299
忘了有多久
忘了有多久 2021-02-08 12:50

How could I tell one .lib file is a static library v.s. an import library for a DLL? Is there any tool or command that could do this?

Second question is how could I chec

2条回答
  •  别跟我提以往
    2021-02-08 13:07

    Given only a wtf.lib file, the question is to determine wither this library file is a static library or an import library. The current way I do this is (via a combination of DOS prompt and a cygwin bash shell).

    In DOS prompt needed to correctly run dumpbin.exe:

    dumpbin -all wtf.lib > wtf.lib.txt

    Then, in cygwin shell:

    grep 'Archive member name' wtf.lib.txt

    If the output of grep spits out a DLL filename, then wtf.lib is an import library. Else, it is a stand-alone static library.

提交回复
热议问题