Re: newbie question: tangential compiler errors
Re: newbie question: tangential compiler errors
- Subject: Re: newbie question: tangential compiler errors
- From: Chris Hanson <email@hidden>
- Date: Mon, 13 Oct 2008 20:07:44 -0700
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