Dynamic library

An implicit request occurs if the program is configured to automatically load the dynamic library and this is setup at link-time.

Explicit requests are made by a program via operating system API calls.

More commonly, the library name without path information is stored in the executable, and the loader applies a search algorithm to find the file.

If a dynamic library that an program depends is unavailable (deleted, moved, renamed) or replaced with an incompatible version, the executable will fail at run-time.

Later, Windows allowed for loading from a DLL file co-located with the program executable.

Moving libraries around causes no problems at all, although users incur a time cost when first starting the system.

Most Unix-like systems have a "search path" specifying file-system directories in which to look for dynamic libraries.

Some systems specify the default path in a configuration file, others hard-code it into the dynamic loader.

Some executable file formats can specify additional directories in which to search for libraries for a particular program.