Re: Errors when using Release configuration
Re: Errors when using Release configuration
- Subject: Re: Errors when using Release configuration
- From: Ben Kazez <email@hidden>
- Date: Wed, 25 Jan 2006 16:11:17 -0600
On Jan 25, 2006, at 12:32 PM, Eric Albert wrote:
On Jan 25, 2006, at 10:22 AM, Ben Kazez wrote:
I have a project that uses MacOSX10.4u.sdk as the target SDK in
General tab of project info. The targets of the project build fine
when I use my Debug configuration, but I get thousands of errors
when I use the Release configuration. Every error is at an
Objective-C-only token, so it seems it's not interpreting the SDK
as Objective-C. I compared my Release build settings to Debug and
didn't see anything different. Any idea what I am missing?
P.S. Errors look like this:
In file included from /Developer/SDKs/MacOSX10.4u.sdk/System/
Library/Frameworks/Foundation.framework/Headers/Foundation.h:12,
from /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
AppKit.framework/Headers/AppKit.h:10:
/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/
Foundation.framework/Headers/NSObjCRuntime.h:60: error: parse
error before '@' token
Sounds like you probably have a C or C++ file in your project, but
you have a precompiled header with
#import <Cocoa/Cocoa.h>
or something like that. That precompiled header won't work as is
when building C or C++ code.
To fix this, change any #imports or #includes of Obj-C headers in
your precompiled header to be within #if __OBJC__ blocks, like this:
#if __OBJC__
#import <Cocoa/Cocoa.h>
#endif
It turns out that my precompiled header did have the #if...#endif
block, but the actual problem was that the precompiled header was set
incorrectly for some of the build configurations in several of me
(dependent) targets. Everything is working now. Thanks for the help!
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden