• 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: newbie question: tangential compiler errors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie question: tangential compiler errors


  • Subject: Re: newbie question: tangential compiler errors
  • From: JB <email@hidden>
  • Date: Wed, 15 Oct 2008 09:04:12 -0700

I unchecked "Precompile Prefix Header" in the new target's build settings
(per Chris's comments) and it compiles without error now.

Thanks!
JB

On Mon, Oct 13, 2008 at 8:07 PM, Chris Hanson <email@hidden> wrote:

> On Oct 13, 2008, at 12:42 PM, JB wrote:
>
>  I've added Apple's sample LoginItemsAE class to autolaunch an app I've
>> built
>> for Tiger and Leopard.  However, the app fails to compile when I add
>> "LoginItemsAE.c" to the app target, throwing over 3000 "syntax" and
>> "conflicting types" errors here:
>>
>> AppKit.h > Foundation.h > NSObjCRuntime.h
>>
>
> You're probably doing this in a new target, which (due to limitations of
> how Xcode creates new targets from templates) has AppKit.h set as its prefix
> header.
>
> Using AppKit.h (which is Objective-C) as a prefix header doesn't guard
> against inclusion in plain C or C++ source files, unfortunately.  You'll
> have to switch the target's prefix header to a local prefix that includes an
> #ifdef __OBJC__/#endif around the #import of <Cocoa/Cocoa.h>, one of which
> was probably created for you when you created the project.
>
>  -- Chris
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >newbie question: tangential compiler errors (From: JB <email@hidden>)
 >Re: newbie question: tangential compiler errors (From: Chris Hanson <email@hidden>)

  • Prev by Date: Fwd: how to complete c/s app
  • Next by Date: Re: how to complete c/s app
  • Previous by thread: Re: newbie question: tangential compiler errors
  • Next by thread: Run Function At Intervals in Cocoa
  • Index(es):
    • Date
    • Thread