Everything you want to know about C static libraries

What’s a library?

Types of libraries

What’s is a static library?

How it is useful?

How do libraries work?

Creating a Static Library file

$ ranlib liholberton.a 
$ ar -rcs liholberton.a *.o

How to use them?

$ gcc main.c -L. -lholberton -o main

Conclusion

Thanks for reading!

--

--

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