GCC -lm -lz -lrt options - what are they about?
-lz
- is zlib, http://zlib.net/-lm
- is the math library as you've worked out (implementation defined AFAIK)-lrt
- provides POSIX realtime extensions: http://www.s-gms.ms.edus.si/cgi-bin/man-cgi?librt+3LIB
The switch -lX generally means to load the library libX.so.
libm is the standard math library; it contains sin(), cos(), atanh(), all that good stuff.
libz is Zlib, a compression library which can do gzip, deflate, and a few other formats.
There are a couple of different librt's out there: one is the POSIX realtime extensions; another is a library of general-purpose programming aids.