Xcode: Framework Headers

Discussion in 'Mac Programming' started by babazaroni, Aug 7, 2010.

  1. babazaroni macrumors newbie

    Mar 19, 2010

    I've added Kernel.framework from sdk10.5 to my kext project and I'm using mach/mach.h in a file.

    But, I get a compile error because mach.h is not in kernel.framework/versions/a/headers/mach. But it is in versions/a/headers/libsa/mach.

    So how do I get Xcode to find this mach.h without adding an include path or adding libsa to the include directive?

  2. gnasher729 macrumors P6


    Nov 25, 2005
    So what's wrong with #include "libsa/mach/mach.h"?
  3. babazaroni thread starter macrumors newbie

    Mar 19, 2010
    It just seems non-standard. When I see code from various projects I always see #include <mach/mach.h>.

    When I do solutions like this, it makes me wonder what else I'm missing, or I'm setting myself up for trouble later.

    Why is mach.h not in the mach directory? I'm sure there is a very good reason.

    BTW, i'm trying to learn mach port ipc in the kernel. If anyone knows of an xcodeproj demonstrating this, I'd sure like a link.
  4. kainjow Moderator emeritus


    Jun 15, 2000
    Because that is where it exists, inside /usr/include. That is the standard location for it. I don't know what Kernel.framework is for but I don't think it's what you want.

    What do you mean by "in the kernel"? As a kext?
  5. babazaroni thread starter macrumors newbie

    Mar 19, 2010
    Yes, as a kext. I need ipc between two kexts.

    The rest of my project has dependencies on kernel.framework.

    I'm doing kernel work, why can't I use the mach.h in the kernel framework. What's it there for if you have to go outside the framework to find it, but all the include files and libraries it uses are in kernel framework? Does not make sense to me.

    What if I built my kext against an earlier sdk then my system?

Share This Page