article

In computer science, a static library, also referred to as a statically linked library, is a computer library in which links are resolved at compile-time by a linker. Static libraries may be merged with other libraries and executables to form a single object file, or they may be loaded at run-time into the address space of the linking executable or library, at a static memory offset determined at link-time.

Creating static libraries in C/C++


Static libraries are easily created when programming in C or C++, since the languages provide storage-class specifiers for indicating external or internal linkage. The following points characterize a static library:

  • Program has no main function to serve as entry point
  • Functions and objects to be exported must have external linkage (e.g. not be using the static keyword)

See The C Book - Linkage and C++ linkage types for more information..

See also


Computer library

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Static library".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld