Correct.
There is static linking, where the object code from (object files and) static libraries is added directly to the executable on compilation.
There is implicit dynamic linking, where linker adds mere "stubs" to the executable, which forces the dynamic linker to load necessary shared objects (dynamic libraries, .so, .dyld, .dll) when the executable loads.
There is
explicit dynamic linking, where nothing about the shared object(s) is linked/stored in the executable (except the string literals in executable code):
1 2 3 4 5
|
QLibrary myLib("my");
typedef int (*MyPrototype)(Tcl_Interp *);
MyPrototype myFunction = (MyPrototype) myLib.resolve("My_Init");
if (myFunction)
...
|
This is what most "plugin"-implementations do use; there might exist no plugins at the time the executable is compiled.
An example of explicit linking: an older graphical application had several options for rendering -- if an OpenGL implementation (i.e. library file) was found, it was used. Otherwise a lesser built-in software renderer was used. One cannot do such thing with implicit linking, because in absence of "optional" library the dynamic linker fails and the app crashes on load.