Notes on library files

A few notes regarding library files.

Shared library: Not the same as a dynamic library. Only used in linux. A .so file extension. Can be shared across processes, not loaded into a process’s address space, loaded globally. (i believe) Note: It is loaded at application startup.

Static library: Also known as an object library, contains a collection of .obj files, extension .lib

Dynamic library: .dll extension or .so. Dynamically loaded by the OS’s loader. Loaded into a process’s address space. (i think) Note: Loaded whenever you use a “load library()” call, not on application startup.

Import library: Allows your program to call entry points in the DLL, .lib file, linux does not require these as it directly links to the .so file

Sometimes a shared library and a dynamic library are said to be the same thing, but they aren’t. If there are any mistakes or I have my facts mixed up, please let me know.

In fact, if you want, there is an entire book dedicated to linkers and loaders online. And it’s free: Linkers and Loaders

Leave a Reply

You must be logged in to post a comment.