Libraries: static and shared
Libraries are the containers into which code is collected so that it can be reused. These (usually) come in two forms: static libraries and shared libraries. Static libraries contain raw compile code plus some metadata that allows the linker to find and incorporate specific functions and classes. These are relatively simple archives of functions and data (including classes) that are pulled in to each application that links them during linking. Shared libraries are somewhat more complicated. Like static libraries, these contain code and metadata, but the code is not pulled into the application binary during linking. Instead, this process happens during loading when the application is first loaded into memory. This work is carried out by the dynamic loader (ld on Linux). The dynamic loader uses an offset table inside the dynamic library to locate each of the needed symbols and make them available to the application.
Static libraries have a slight advantage...