There are two ways a library can be linked dynamically in C/C++. This question is not about static linking where the lib is embedded into the executable. I am using Linux but I know under Windows the principle is the same. That is why I am asking on SO and not SE Unix.
The first way is to pass the lib as command line parameter to the compiler (for example gcc). I think the ELF file format is responsible for saving the dependencies. Later they can be listed using ldd
.
The second way is to call dlopen() manually. I don't know if this way is called linking at all.
So what is the first way and what is the second way called?