I know, that these are some common/basic libraries, but what do they mean exactly?
For example, I know, that -lm
is some math library, but is this the st
The answers above are all correct. The one thing I would add, being a C novice myself, is that the -l
argument tells the compiler to link your code with some library.
The confusion for me and probably others is that there is no space when calling the -l
plus the name of the lib. so -lz
, you are linking to the "z"
Note that these libraries are installed in your system. Either they came with the distro you are using, or you installed using a package manager or compiled from source (make
, make install
...).
Since those are very basic (and old) library APIS, they have very short names. As you progress and install specific libs in your system, you see more verbose names tagging the -l
there.