知道.lib是静态还是导入

问题描述:

我有从C代码编译的 .lib 文件。我如何知道在运行时是否需要这个独立的静态库或只是导入lib和DLL?有没有一些 dumpbin 选项我缺少?

I have .lib file compiled from C code. How I know if this self-contained static library or just an import lib and DLL will be needed at runtime? Is there some dumpbin option I'm missing?

使用lib命令。如果它是静态的,lib将显示一堆.obj文件。

Use the lib command. If it's static, lib will show you a pile of .obj files inside. Not so if it's am implib.

lib /list foo.lib

将会这样做。

另见:

http://msdn.microsoft.com /en-us/library/e17b885t(v=vs.80).aspx