Re: Has anyone run a build with xcode and C++ STL on 10.2
Re: Has anyone run a build with xcode and C++ STL on 10.2
- Subject: Re: Has anyone run a build with xcode and C++ STL on 10.2
- From: Kevin Grant <email@hidden>
- Date: Mon, 2 Feb 2004 00:08:36 -0600
I have successfully done this, although I don't use wchar_t and I
will concede that it is tricky.
Basically I have to work around the fact that the SDK lacks
declarations for all new APIs, so I am inserting raw values for
things that would otherwise have nice constants declared; and (in my
case) I am also manually loading APIs because weak linking is not
supported on 10.1.
So you are building from a 10.2.x SDK I assume, then adding whatever
10.3-specific declarations you need to your own code?
Have you tried going the other way around, building from the 10.3 SDK
and getting the app to launch properly on 10.2? Just curious. Being
able to go that route would be extremely convenient for me. Plus it's
what the weak-linking mechanism introduced in 10.2 is supposed to
allow us to do.
The 10.1.5 SDK, actually. Yeah, I basically fake headers because I
can't use official declarations for new constants, etc.
[To be honest, I'm not sure why the SDKs don't all use the latest
available headers; AvailabilityMacros.h is supposed to allow strict API
exclusion if so desired, and an API isn't going to disappear or change
its signature, right...? Plus, 10.3 headers clearly state what is
available on which OS version.]
I believe you should be able to leverage weak-linking as you suggest,
starting on 10.3, provided you require 10.2 minimum. You may have to
downgrade your GCC compiler to 3.1 in Xcode, I'm not sure.
Of course, I decided to torture myself by trying to support 10.1 while
working around Apple's gargantuan blunder of not supporting
null-pointer-style API checks in early versions of Mach-O. I furthered
the torture by choosing the C++ language, thereby ensuring my built
objects are plagued by application binary interface incompatibilities
across compilers. :) Given these wise decisions on my part, I
couldn't start directly from the 10.3 SDK. ;)
Kevin G.
http://homepage.mac.com/kmg/
mail to kevin at ieee dot org
_______________________________________________
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.