Re: How are stdlib.h and time.h imported?
Re: How are stdlib.h and time.h imported?
- Subject: Re: How are stdlib.h and time.h imported?
- From: Boris Remizov <email@hidden>
- Date: Tue, 21 Aug 2007 10:51:32 +0400
Its standard behavior of gcc and other compilers. It looks in the
well known places for header (eg. /usr/include ) and static libraries
(/usr/lib) automatically.
On Aug 20, 2007, at 22:37 , Frank Bettger wrote:
Started to read Hillegass book,
In his first example he uses three C functions random() , srandom and
time(). But he doesn't explain much where they come from or how the
compiler
finds them. Not knowing so much about C, I tried to look them up
from Xcode
by choosing Help->Documentation and then searching for these words.
Here's
what I've found.
#include <stdlib.h>
long random(void);
void srandom(unsigned long seed);
#include <time.h>
time_t time(time_t *tloc);
Here is my question
How does the compile find random() and time(). According to the
docs you
should import stdlib.h and time.h, but Hillegass code does not
import any of
them. The only thing imported in Hillegass code is <Cocoa/Cocoa.h>,
and I've
looked in that file and do not see any imports of time.h and stdlib.h?
Thanks Frank
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden