问题描述
我正在尝试建立一个用于模拟器或设备构建的库,我看到的所有地方都说明SDKROOT应该扩展为/Developer/Platform/<>/SDKs/<>/,其中将<>填入根据您的项目设置.
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.
Internet上的许多链接都说明SDKROOT会扩展到某个路径,但是较新版本的XCode SDKROOT会扩展到"iphoneos2.2.1"-几乎没有帮助(对于此任务).
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:
我通过查看Mac上的一些较旧的文档来确认更改.
I confirmed the change by looking at some older documentation on my mac.
是否有关于如何在最新的XCode版本中实现类似功能的想法?我的最终目标是以独立于平台的方式链接到静态库.头文件在每个平台上都不同,因此构建一个静态静态库无法解决问题.
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.
推荐答案
在Xcode 3.2.1中,SDK_DIR看起来包含了以前在SDKROOT中的路径.
In Xcode 3.2.1, it looks like SDK_DIR contains the path that used to be in SDKROOT.
这篇关于在XCode中获得较旧的SDKROOT行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!