Errors With AppKit

Sage
Posts: 1,066
Joined: 2004.07
Post: #1
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:
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 `)' token

Any ideas how to get rid of all of that?
Quote this message in a reply
Oldtimer
Posts: 834
Joined: 2002.09
Post: #2
Looks like you're including Cocoa in a file that doesn't end with .m. Smile
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #4
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.
Quote this message in a reply
Member
Posts: 30
Joined: 2006.04
Post: #5
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?
Quote this message in a reply
Post Reply