PDA

View Full Version : Errors With AppKit


Nick
2006.07.10, 02:20 AM
I'm trying to make an app using the Ogre framework after finally compiling it for 10.3.9, but I'm getting a lot of errors with the AppKit framework:
In file included from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:9,
from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:10:
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:56: error: parse error before `@' token
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:58: error: syntax error before `*' token
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:59: error: `NSString' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:59: error: `aSelectorName' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:60: error: `NSString' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:60: error: `aClassName' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:61: error: syntax error before `*' token
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:64: error: `NSString' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:64: error: `format' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:64: error: parse error before `...' token
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:65: error: `NSString' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:65: error: `format' was not declared in this scope
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:65: error: parse error before `)' token

Any ideas how to get rid of all of that?

Fenris
2006.07.10, 03:49 AM
Looks like you're including Cocoa in a file that doesn't end with .m. :)

OneSadCookie
2006.07.10, 05:54 AM
possibly due to this:

http://tips.onesadcookie.net/tips/published/Writing+Precompiled+Headers+for+Xcode

Nick
2006.07.10, 01:41 PM
Thanks for the ideas, but I don't have any precompiled headers, nor am I explicitly including AppKit. I'm using Ogre and SDL which is why it's referencing AppKit, but I'm not sure where it is doing this. I have SDLMain.h/.m in my project, but that isn't solving it either.

icklefrelp
2006.07.10, 05:24 PM
I had a similar problem a few weeks ago. I wasn't using pre-compiled headers but was getting similar errors in AppKit.h. In the end it seemed to be GCC_PREFIX_HEADER was getting a wierd setting.

Here's a link to the thread, http://www.idevgames.com/forum/showthread.php?t=12222

it might be relevant here too. Check your targets Prefix Header setting doesn't have an unexpected setting. Mine was $(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h for some reason?