• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Errors when using Release configuration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Errors when using Release configuration (From: Ben Kazez <email@hidden>)
 >Re: Errors when using Release configuration (From: Eric Albert <email@hidden>)

  • Prev by Date: RE: Code stripping blues...
  • Next by Date: Clean only current project
  • Previous by thread: Re: Errors when using Release configuration
  • Next by thread: Re: Errors when using Release configuration
  • Index(es):
    • Date
    • Thread