Re: Objective C errors when compiling for 64 bit?
Re: Objective C errors when compiling for 64 bit?
- Subject: Re: Objective C errors when compiling for 64 bit?
- From: Jon Hodgson <email@hidden>
- Date: Thu, 16 Sep 2010 16:07:15 +0100
More info... some clarification and a new question.
Looking at the code I'm compiling it looks like the cause of the
errors is that it includes Carbon for 32 bit apps, but Cocoa for 64
bit ones.
#ifndef __LP64__
#include <Carbon/Carbon.h>
#else
#include <Cocoa/Cocoa.h>
#include <CoreFoundation/CoreFoundation.h>
#endif
Is that necessary? Also is there a way of doing this that doesn't
include Objective C headers? Or is cocoa objective C only?
On Thu, Sep 16, 2010 at 12:56 PM, Jon Hodgson
<email@hidden> wrote:
> Further to my last post.
>
> The same solution causes problems with other code, because id is a
> reserved Objective C identifier, but is being used as a variable in
> that code.
>
> On Thu, Sep 16, 2010 at 11:45 AM, Jon Hodgson
> <email@hidden> wrote:
>> Hi,
>>
>> I have a project, it builds fine when set for a 32 bit target.
>>
>> If I switch the target to 64 bit intel (the only change I make), I get
>> thousands upon thousands of errors which are basically the C++
>> compiler complaining about Objective C syntax (there is no Objective-C
>> in my code, this is all coming from included headers).
>>
>> Setting "Compile Sources as" to "Objective-C++" solves the problem,
>> but this seems a little brute force really.
>>
>> So, what I'm asking is, is this a normal problem and is this the
>> normal solution, or if not, what's happening and what should the
>> solution be?
>>
>> regards
>>
>> Jon
>>
>
_______________________________________________
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