• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Has anyone run a build with xcode and C++ STL on 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Has anyone run a build with xcode and C++ STL on 10.2 (From: Kevin Grant <email@hidden>)
 >Re: Has anyone run a build with xcode and C++ STL on 10.2 (From: Paul Lalonde <email@hidden>)

  • Prev by Date: Re: Code collapse/expand
  • Next by Date: Re: Indirect framework reference problems
  • Previous by thread: Re: Has anyone run a build with xcode and C++ STL on 10.2
  • Next by thread: IB - Removing a custom table column cell?
  • Index(es):
    • Date
    • Thread