A library is a collection of subroutines that allows the code of those subroutines to be used as separate modules.

How do they work ?


Simple Shell was our team project with Aurelie Cedia at the end of the first trimester in Software Engineering Holberton School. The goal of this project is to write a simple UNIX command interpreter. In this article I will describe step by step what happens when you type “ls -l” and hit Enter in a Shell.

Some important details:

  • Our program must have the exact same output as sh (/bin/sh) as well as the exact same error output.
  • We were limited by allowed for use functions and system calls, that’s why you will see in some images using, for example…

A static library is a collection of object files that are attached to a program when the program is linked. Thus, static libraries are used only when creating a program. Then they do not take part in the work of the program itself.

To create static libraries, there is a special simple program called ar (short for archiver). It is used to create, modify and view object files in static libraries, which are really simple archives.

First of all, to create your own static library, you need to write its implementation. Let’s say that we have several .c files with…

Natalia Ponsard

Software engineering student at Holberton School

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store