know if .lib is static or import

c, c++, dll, windows

Solution

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

lib /list foo.lib

will do it.

Also see:

https://learn.microsoft.com/en-us/cpp/build/reference/managing-a-library

Problem

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?

Original source

Related problems