如何找到条件编译的iPhone SDK的确切版本?
我正在寻找一个宏来指定用于编译的 iPhone SDK 的确切版本。这是必需的,因为当使用(且仅使用)SDK 3.0 进行编译时,我需要添加一些额外的代码。
__IPHONE_OS_VERSION_MIN_REQUIRED
在这里不是正确的选择,因为它可以由用户使用参数 -mmacosx-version-min
设置。例如,用户可以在 SDK 3.1 中使用最小版本 -mmacosx-version-min=3.0
进行编译,因此对 __IPHONE_OS_VERSION_MIN_REQUIRED == 30000
的检查将为 true,即使用户正在使用 SDK 3.1 进行编译。
任何帮助表示赞赏。
问候, 约亨
I'm looking for a macro that specified the exact version of the iPhone SDK used for compilation. This is needed because when compiling with (and only with) SDK 3.0, I need to add some additional code.
__IPHONE_OS_VERSION_MIN_REQUIRED
is not the right choice here, since it can be set by the user with parameter -mmacosx-version-min
. For example, a user can compile with min version -mmacosx-version-min=3.0
in SDK 3.1, so a check for __IPHONE_OS_VERSION_MIN_REQUIRED == 30000
would be true, even if the user is compiling with SDK 3.1.
Any help is appreciated.
Regards,
Jochen
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下宏
You can use the following macros