Shriramana Sharma wrote:
libm is the name of the math library located in /usr/lib. The -l switch tells gcc to link against the specified library. Normally, the lib* prefix is omitted here just as seen with linking against 'libpthread' by specifying 'lpthread'.
So do I need to specify -lt if I want to link against time.h?
No, the functions define in time.h are included in the default libraries.
There are fifteen ANSI libraries - assert, ctype, errno, float, limits, locale, math, setjmp, signal, stdarg, stddef, stdio, stdlib, string, time. Do I do a -l for each of these?
Those are include files, not libraries. And no, you don't need to add -l for each of those.
Effectively all UNIX systems come with manpages for system calls and library functions (commonly sections 2 and 3).
System calls such as? chmod?
For instance, yes. "man 2 chmod" /Per Jessen, Zürich