Libraries in C: static or dynamic?

Photo by Evgeni Tcherkasski on Unsplash

What is a library in C?

Why choose one over the other?

Static library
Dynamic (or shared) library

How to create a Static library?

How to create a Dynamic / Shared library?

ldd len => (0x00007fff5d1d2000) => not found => /lib/x86_64-linux-gnu/ (0x00007f74c6bb9000)
/lib64/ (0x0000556be5b82000)
ldd len => (0x00007fff41ae9000) => ./ (0x00007fd4bf2d9000) => /lib/x86_64-linux-gnu/ (0x00007fd4beef6000)
/lib64/ (0x0000557566402000)

How to use a static or dynamic library?

gcc -L. *.c -lname -o out

Software Engineer student at Holberton School. Reach me @huyxuanminh