Dynamic linking records an executable’s reliance on a separately compiled library, which the operating system can load and run when needed. section 5.2.1
The practical trade-off is how library code reaches the executable:
- Static linking copies library code into the executable; dynamic linking records a dependency on the library. section 5.2.1
- Dynamic system-library dependencies can make a program behave differently or fail on systems with older library versions. Zig often favors static linking to avoid that deployment problem, while GLFW expects dynamic system libraries. section 7.2.1
Figure 5.2 What a simple executable actually contains
Use the executable diagram to see where a library dependency fits. section 5.2.1

