Re: The Searchers
Re: The Searchers
- Subject: Re: The Searchers
- From: Josh Graessley <email@hidden>
- Date: Wed, 5 Apr 2006 13:59:02 -0700
On Apr 5, 2006, at 1:46 PM, David A Rowland wrote:
I'm having trouble bending XCode to my will. I'm writing a kernel
extension, and I set up a project from the kext template. In one
file I include netdb.h, which is not in the kernel framework so I
need to search /usr/include/. I added /usr/include/ to the header
search paths in the config panel.
Don't do that. /usr/include has header files for user space programs.
When you are writing a kernel extension, you will be linking against
the kernel, not against user space libraries. A number of header files
actually overlap between the two. For example, both have a netinet/
in.h. These files actually contain different things depending on
whether you're using the user space version or the kernel framework
version.
That, however, produces an error when I include malloc.h. The
malloc.h is found in /usr/include/ when the copy I want is in the
kernel framework. The documentation for XCode and GCC seems to say
that the frameworks will be searched first, but it appears not to be
so.
Why do you want netdb.h in your kext? There are some reasons you may
want such a thing, but it's likely that all this trouble is just a
sign that you're headed down the wrong path. A little more information
might help us point you in the right direction ;)
-josh
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >The Searchers (From: David A Rowland <email@hidden>) |