views:

567

answers:

1

I'm trying to setup a library for simulator or device building and everywhere I see explains that SDKROOT should expand to a /Developer/Platform/<>/SDKs/<>/, where <> is filled in by your project settings.

Many links on the internet explain that SDKROOT will expand to a path, but the newer versions of XCode, SDKROOT expands to "iphoneos2.2.1" - which isn't nearly as helpful (for this task).

Clearly enough if you look at apples documentation, the behavior changed:

http://developer.apple.com/mac/library/DOCUMENTATION/DeveloperTools/Reference/XcodeBuildSettingRef/9-Revision-3.1/history.html

I confirmed the change by looking at some older documentation on my mac.

Any thoughts on how to achieve similar functionality in the latest XCode builds? My end goal is to link to a static library in platform independent ways. The header files differ on each platform, so building a fat-static library doesn't solve the problem.

+3  A: 

In Xcode 3.2.1, it looks like SDK_DIR contains the path that used to be in SDKROOT.

cstawarz