Shriramana Sharma wrote:
Sunday, 08 January 2006 15:34 samaye, Per Jessen alekhiit:
No, the functions define in time.h are included in the default libraries.
So how do I find out which functions defined in which standard headers are included in the default libraries and which not?
I'm sure there is a library reference somewhere, but trial-and-error will tell you too.
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.
You mean I can add a single -l for all of them? I'm sorry I'm confused. Please explain.
No, they are header files and except for math, the corresponding library is included by default. So no need to add any '-l' except for math.
IIRC include files are declarations of functions available in libraries. If there are fifteen standard include files, why are the corresponding libraries not included by default?
The default library is. But your questions are probably better asked elsewhere - like Randall Schultz also suggested. Especially if you want to know about why and how the compiler does what it does, the gnu-gcc lists might be a good suggestion. /Per Jessen, Zürich -- http://www.spamchek.com/ - managed anti-spam and anti-virus solution. Let us analyse your spam- and virus-threat - up to 2 months for free.