When linking against routines contained in a software library (e.g., a .so or .a file on a Unix machine, or a .lib or .dll file on a MS Windows machine), one can link statically or dynamically. If linking is static, the link-editor will extract a relocatable object from a library and this object will become part of the final executable; if linking is dynamic inclusion of the object is deferred until process execution.
Statically linked executables usually load faster but are bigger. Dynamically linked executables usually load more slowly but are smaller. Dynamic linking requires that the libraries in which the required objects reside be available to the executable at run-time.
Under static mode, the linker will accepts only relocatable objects or archive libraries (.a files) as input files; under dynamic mode, the linker also accepts shared objects (.so files).
Further information can be found on the Sun documentation site in the Linker and Libraries Guide.
Under MS Windows, one statically links against a .lib file and dynamically links against a .dll file.
...previous | up (conts) | next... |