cmake
add_library documentation says,
SHARED libraries are linked dynamically and loaded at runtime. MODULE libraries are plugins that are not linked into other targets but may be loaded dynamically at runtime using dlopen-like functionality.
Practically, I can see both SHARED
and MODULE
type targets generate .so
dynamic libraries on Linux. .so
libraries are dynamically linked, loaded at runtime and be mapped using dlopen()
. How do these two types of targets differ?