CHAPTER 5

image

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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.