C Static Libraries

  • .a for Static Libraries.
  • .so for Shared Libraries.

What is a Static Library?

Static library linked into executable.

Why use them?

  • You can take your program to another computer and it will execute normally. It’s Portable!
  • Your executable program is faster when it uses a static library, due to having the copy of the library in itself and not in another location.
  • As said before, if you do changes into the static library this won’t affect the executable. This makes the Static libraries a good option when your programs aren’t so big and kind of simple.

Creating a Static library

How to use static libraries?



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
Valentina Jaramillo Ramirez

Valentina Jaramillo Ramirez

EN | SP Software Developer Student at Holberton School in Medellin, Colombia.