Table of Contents
[ fromfile: libraries.xml id: libraries ]
Abstract
Libraries are groups of code modules, organized in a reusable way. This chapter introduces how they are built, reused, and designed.
Libraries generally contain code that has already been designed, tested, and compiled, and can be easily linked into your application. Libraries are essential for making software reuse possible. They can be packaged in a number of different ways.
source code
binary format (dynamic library, shared object, static library, runtime library), called lib for short.
lib + header files (sometimes referred to as “-dev” or “-devel” packages in Linux package managers)
| Note | |
|---|---|
The lib+header combo allows you to distribute your library without the full source. Others can still compile their apps with it. The binary format can only be used with an app that was already compiled against the library. |
A lib is a file that contains several compiled files (called object files) that are indexed to make it easy for the linker to locate symbols (e.g., names of classes, members, functions, variables, etc.) and their definitions. Packaging these object files in one lib expedites the linking process significantly.
| Generated: $Date: 2009-09-08 12:15:32 -0400 (Tue, 08 Sep 2009) $ | © 2009 Alan Ezust and Paul Ezust. |