How to tell if a lib file created in VC7 is a static or dynamic?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Could anyone point me to a resource that will help me determine if a lib
file is a static lib or dynamic? Moreover, is there a tool that will tell me
the interface?

Thanks,
Kris
 
i don't know how you can do this correctly, but there are a few clues:

a lib for a dynamic library contains only the linking information for the
exported types and functions.
hence it is very small (a few K).
if you open a lib for a dynamic library in a text editor or a hex editor,
you will see a lot of import descriptors, and little else.
if you have the header file, see if the functions are declared with the
dllexport directive. that also indicates that the libary accompanies a
dynamic library.

hope this helps a bit.

kind regards,
Bruno.
 
Kris Takacs said:
Hello,

Could anyone point me to a resource that will help me determine if a lib
file is a static lib or dynamic? Moreover, is there a tool that will tell
me
the interface?

In general, it's impossible, because in general, they're no different. You
can certainly have a library that contains import records for a DLL and also
contains static linked code. The C++ runtime libraries are examples of
such - nearly the entire library is import descriptors, but there are a few
code objects as well.

Typically, you can tell them apart as Bruno already replied.

-cd
 
Back
Top