Re: cross development sdk's
Re: cross development sdk's
- Subject: Re: cross development sdk's
- From: Chris Espinosa <email@hidden>
- Date: Thu, 6 Nov 2003 12:30:59 -0800
On Nov 5, 2003, at 8:03 AM, Marquis Logan wrote:
hi,
my goal is to develop an app with the 10.3 sdk and a 10.2 deployment
target so that i can weak link in a couple new panther only features.
i set the project sdk to 10.3, i set the deployment target to 10.2 on
a per target basis.
my problem is this:
when using the 10.3 sdk, the availability macros apparently have no
effect over many of the system libraries and headers. for example:
/Developer/SDKs/MacOSX10.3.0.sdk/usr/include/gcc/darwin/3.3/c++/ppc-
darwin/bits/c++config.h
does not pay attention to the deployment target, and as a result it
configures c++ to expect symbols that are defined in the 10.3 sdk but
not in 10.2. i'd think that setting a 10.2 deployment should either
use the 10.2 config or weak link in those problem symbols.
(_wmemmove, _wcslen...etc).
is this a bug, or am i missing something and using the cross
development sdk's improperly?
As is noted in the Cross-Development documentation
(file:///Developer/Documentation/DeveloperTools/Conceptual/
cross_development/CrossDevelopment.html), the Carbon and (to a lesser
degree Cocoa) frameworks are the ones most adapted to the
AvailabilityMacros.h style of cross-development. The open-source
nature of the BSD, OpenGL, Kernel, and other significant parts of Mac
OS X means that it's not as easy to enforce an Apple-designed version
management scheme on them.
Some of these have their own version-management schemes (OpenGL, for
instance) and others more or less lock you in to deploying on the
version you build for (that is, you can build on Panther for Jaguar,
but not on Panther-for-Jaguar-but-use-Panther-ABIs-when-available).
A workaround is to copy the definitions of the routines you want to
weak-link to into a project-specific .h file and mark them with the
appropriate AvailabilityMacro (e.g.
AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER). This will invoke the
weak-linking feature of GCC 3.1 and later, and allow you to deploy that
binary on Jaguar.
Chris Espinosa
Apple
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.