Errors With AppKit
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:
Any ideas how to get rid of all of that?
Code:
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 `)' tokenAny ideas how to get rid of all of that?
Looks like you're including Cocoa in a file that doesn't end with .m.
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.
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?
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?

