Re: newbie question: tangential compiler errors
Re: newbie question: tangential compiler errors
- Subject: Re: newbie question: tangential compiler errors
- From: "Michael Ash" <email@hidden>
- Date: Mon, 13 Oct 2008 23:02:17 -0400
On Mon, Oct 13, 2008 at 3:42 PM, JB <email@hidden> wrote:
> Hi all,
>
> 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 getting AppKit.h into your LoginItemsAE.c file. Since this is a
C file, it does not understand Objective-C, and so the compiler goes
nuts when it sees this foreign language.
I assume you aren't explicitly importing AppKit.h in this file, so it
must be happening implicitly, probably because either you've modified
it to import one of your own headers which then imports it, or because
you've set a project-wide prefix header which imports it and didn't
tell the compiler not to do this for plain C files.
Mike
_______________________________________________
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