This is my second article in the "C/C++ library programming on Linux" series. I recommend that you read the first part of this article series where I've explained the whole library thing, and gave an example of creating and using static library.
C/C++ library programming on Linux – Part one: Static libraries
In this article I will explain dynamic libraries and compare them to static libraries. I will also give an example of creating and using dynamic library.
Dynamic (shared) libraries
Dynamic libraries are different from static libraries in a way that by using them, during compilation process, GCC ads only code "hooks" and soname. That "hooks" and library soname are used during the startup of your application to load correct library and connect "inside" with the "outside" code.
Continue reading