Re: 10.4 vs 10.5 SDK - some problems in compilation
Re: 10.4 vs 10.5 SDK - some problems in compilation
- Subject: Re: 10.4 vs 10.5 SDK - some problems in compilation
- From: Steve Christensen <email@hidden>
- Date: Wed, 15 Jul 2009 06:57:41 -0700
On Jul 15, 2009, at 5:10 AM, Alexander Bokovikov wrote:
I'm rather new in XCode and Cocoa, so maybe it's my
misunderstanding. Am I correct in my understanding, that I need to
select 10.4 SDK in XCode project menu to create an application,
compatible with both Tiger and Leo? I've got few errors in
compilation when I choose 10.4 SDK.
For your case you'll need to set the SDK to 10.5 so that you can use
Leopard-specific APIs. You'll also need to set the deployment target
to 10.4 so that Xcode knows to build code that will also run on 10.4.
Some of these errors, like NSUInteger and CGFloat missing, I've
fixed by appropriate basic types substituting. Nevertheless I still
have one uresolved problem - kVK_XXXX constants are not found in
10.4 SDK, though they're OK with 10.5. I've tried to search in
Google, but the only I've found was some FAQ, where it was
suggested to use absolute path to the header file. I've tried it,
but without luck. Though I use #import</System/Library/......./
Events.h> (what is shown in Get Info for that header in Finder) I
still get the same error.
NSUInteger and CGFloat are only defined in the 10.5 SDK, even though
they're perfectly fine data types on a 10.4 system. Any 10.5 C-style
functions or constants will be weak linked so you'll need to check
for their existence at runtime. Likewise you'll need to check for the
existence of 10.5-only Cocoa methods using -respondsToSelector:.
What is strange for me, all works OK even without this #import
clause when I'm using 10.5 SDK.
_______________________________________________
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