Re: Making sure my code will run on Tiger 10.4 when I'm compiling on Leopard 10.5.
Re: Making sure my code will run on Tiger 10.4 when I'm compiling on Leopard 10.5.
- Subject: Re: Making sure my code will run on Tiger 10.4 when I'm compiling on Leopard 10.5.
- From: Ryan Poling <email@hidden>
- Date: Tue, 11 Dec 2007 14:22:46 -0800
Thanks for the response - I'll definitely file at least a feature
request with Apple about that - it would certainly be nice if they
made it easier for us!
-Ryan
On Dec 11, 2007, at 2:59 AM, Alastair Houghton wrote:
I filed a bug report over two years ago now <rdar://4159295> asking
for a mechanism to cause the compiler to warn about use of APIs
newer than a specified version unless I took action to prevent it.
The example I gave was something like
if (<test for presence of API somehow>) {
#pragma enable-api MACOSX_VERSION_10_5
/* Use the 10.5 API here */
#pragma enable-api
} else {
/* 10.4-compatible code here */
}
but obviously there are lots of choices that could be made about the
syntax.
I don't *think* this issue has been addressed; certainly my bug
report is still open. And in the absence of such a feature, your
options are:
1. Build against the Tiger SDK and don't use Leopard features at all.
2. Put Leopard code in its own files, and use different settings
for just those files.
3. Do what you are doing now, plus *lots* of testing.
My experience of developing simultaneously for 10.4 and 10.3, and
before that for 10.3 and 10.2, leads me to conclude that this
problem is something of a nuisance in practice, which is why I filed
a bug report.
(If you file a bug report on this as well, please refer to mine as
it will make it easier for the people at Apple to see that there's
more than one request for this type of feature.)
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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