PDA

View Full Version : IOKit dont compile




nMac
Jun 19, 2011, 04:05 PM
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

thanks!



robbieduncan
Jun 19, 2011, 04:07 PM
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.

nMac
Jun 19, 2011, 04:21 PM
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.

That's a great detail! :rolleyes:

Thank you!

larkost
Jun 19, 2011, 07:20 PM
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.