Re: Calling BSD from Cocoa and/or CFM?
Re: Calling BSD from Cocoa and/or CFM?
- Subject: Re: Calling BSD from Cocoa and/or CFM?
- From: Rainer Brockerhoff <email@hidden>
- Date: Wed, 23 Jan 2002 18:32:30 -0200
>
Date: Wed, 23 Jan 2002 11:17:21 -0700
>
From: Zack Morris <email@hidden>
>
>
Okay, I researched the problem all last night and this morning but still
>
found nothing. Does anyone know why I can call getpwent() right from my
>
project builder app by just #including <pwd.h>, but I can't lookup the
>
symbol in System.framework for my carbon cfm app in codewarrior? I am able
>
to lookup and call gethostname(), so what gives? Is there some library I
>
need? Is the symbol in another framework, and if so, how do I find which
>
framework it's in?
>
This is coming up on the 8 hour mark of research, which means I
>
basically lost a day's work trying to find something that I am 99.9% of the
>
way done with...this does not bode well for unix development :)
I found the System.framework to be incomplete. In Project Builder, what I eventually hit on was to:
1) In my target, Build Settings -> Search Paths -> Headers I included "/usr/include"
2) In my source files, I put:
#include </usr/include/pwd.h>
and so forth, wherever appropriate.
This will make all the UNIX headers searchable...
I don't have the latest Codewarrior, so I'm not sure what the equivalent there is...
HTH,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"I love deadlines. I love the whooshing noise they make as they go by" (Douglas Adams)
http://www.brockerhoff.net/ (updated Jan. 2002)