
Dynamic Library
A dynamic library, also called a shared library, consists of routines that are loaded
into the application at run-time. If a program is compiled with a dynamic library, the
library does not become part of final executable. It remains as a separate unit
+ A dynamic library can be modified without re-link: bug fixing, new functionalities
– Dynamic library functions are called outside the executable. Neither the linker nor
the compiler can optimize the code between shared libraries and the final
executable
• The environment variables must be set to the right shared library path, otherwise
the application crashes at the beginning
Given the shared library my_lib , the corresponding file is:
Linux libmy_lib.so
Windows my_lib.dll + my_lib.lib
38/48