1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

IOKit dont compile

Discussion in 'Mac Programming' started by nMac, Jun 19, 2011.

  1. macrumors newbie

    Hi everyone,

    I'm new on Mac OS. So, I created a Terminal Project in C on Xcode 3.2.
    I wanna compile my terminal project with "<IOKit/IOKitLib.h>" and "<Foundation/Foundation.h>", but when I do it return several errors(something like 7k errors). However, if I create a Cocoa Project, these libs compile well. These frameworks works only on Objective-C?

    I need some light here... what I doing wrong? O past my last two days searching some to help me, but I failed ;p

  2. Moderator


    Staff Member

    Foundation certainly requires Objective-C. Depending on what you want from Foundation you may be able to drop down a level to CoreFoundation (CF prefixed) pure C level APIs.
  3. macrumors newbie

    That's a great detail! :rolleyes:

    Thank you!
  4. macrumors 6502a

    The real problem here is that you have probably not included the Foundation framework into your project. So when it goes t compile it does not find anything.

    Right click on the "Frameworks" portion of your project, and you can add it.

Share This Page