Re: Including Cocoa in a Carbon App
Re: Including Cocoa in a Carbon App
- Subject: Re: Including Cocoa in a Carbon App
- From: "Jason T. Slack-Moehrle" <email@hidden>
- Date: Wed, 29 Dec 2010 14:41:43 -0800
Hi Nick,
>> In my .pch I am adding:
>>
>> #ifdef __APPLE__ & __MACH__
<snip>
> What you're doing will not work when building C and C++ source code in that project, because those headers include ObjC definitions. If you do have C or C++ source code, then the easiest way to fix this is to use the preprocessor definition __OBJC__ rather than the two you are using above.
In my code (which is OS X and Windows) I am currently using #ifdef __APPLE__ for Apple specific items, I need to move this to Objective-C and call from CPP should I switch to __OBJC__ instead of __APPLE__? I am presuming from your solution that __APPLE__ just means the platform of OS9 or OS X and Objective-C is not on OS 9. I thought that __MACH__ ensured OS X? Which I take it also could not imply __OBJC__
Preprocessor defines are confusing...
-Jason
_______________________________________________
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