[CMake] static libs and more

David Cole david.cole at kitware.com
Thu Jul 17 20:04:34 EDT 2008


On Thu, Jul 17, 2008 at 7:48 PM, Philip Lowman <philip at yhbt.com> wrote:

Does anyone know of any other platforms that share filename extensions for
> archive vs. shared libraries other than MSVC/Win32?
>

The .lib files associated with DLLs on Windows are not really "shared
libraries". The DLLs themselves are the shared libraries. The .lib files are
just directives to the linker that say how to resolve to the DLL. They are
sort of mini-archives with a bunch of "function pointers," if you will, in
them instead of object code. The object code is in the DLL and the .lib file
points to it.

The .lib tells the linker that when it links a program against any
"functions" in it, that the built executable must be able to load the
corresponding DLL when it loads to resolve those functions.

Having said all this, yeah, it's not pretty..., but it's the way it is
because of the way it was...

And I am not aware of any other platforms that share filename extensions for
archive vs. shared libraries.


;)
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080717/717eb1d4/attachment-0001.htm>


More information about the CMake mailing list