Working with Static Libraries

In this chapter, I will review the typical life cycle in dealing with static libraries. I will start with simple guidelines for creating static library, then I will provide the overview of typical use case scenarios, and finally I will take a closer look at certain expert-level design tips and tricks.

Creating Static Library

A static library is created when the object files created by compiler from the set of source files are bundled together into a single archive file. This task is performed by a tool called an archiver.

Creating Linux Static Library

On Linux, the archiver tool, called simply ar, is available ...

Get Advanced C and C++ Compiling now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.