【问题标题】:Updating to iOS 9.0 SDK framework project build failed更新到 iOS 9.0 SDK 框架项目构建失败
【发布时间】:2015-12-20 02:39:16
【问题描述】:

我是 iOS 编程的新手,最近我在做一个框架项目。我之前使用的是 iOS 8.4 SDK,我使用这个项目为 iOS 设备和模拟器生成框架,然后使用一些脚本将它们合并到一个框架中。

我的构建设置: 架构:标准架构; i386 有效架构:armv7;手臂64; i386

但是,当我将 iOS SDK 更新到 9.0 时,那里显示了一些错误。它曾经在 iOS 8.4 中成功构建。 表明 1./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/cdefs.h:707:2:不支持的架构 2./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/machine/_types.h:34:2:不支持架构 3./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/_types.h:55:9:未知类型名称'__int64_t' 4./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/_types.h:56:9:未知类型名称'__int32_t' ......还有很多类似的 __int43/64_t 5./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/_types/_intptr_t.h:30:9: 未知类型名称'__darwin_intptr_t ' 6./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10:可以不构建模块“达尔文”

如果我从架构中删除 i386,几个错误就会消失。此外,如果我将 Apple LLVM 7.0 - Language - Modules: Enable Modules (C and Object-C) 从 yes 更改为 no,模块问题将得到修复。我可以正确构建框架。

但是,当我在我的框架测试应用程序中使用这个框架时,它以前也可以工作。它会有一些错误: 架构 x86_64 的未定义符号。

谁能向我解释 iOS 更新发生了什么?如何生成可以在另一个项目中用作 SDK 的正确框架。

【问题讨论】:

    标签: build sdk frameworks ios9


    【解决方案1】:

    使用 iOS SDK 12.1,我收到了同样的错误。原因是在使用 CMake 编译时,我将目标架构从 x86_64 更改为 arm64,但没有清理构建文件夹。清洁后 /Users/yourname/Library/Developer/Xcode/DerivedData 并重新运行 CMake 一切正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-17
      • 2019-06-15
      相关资源
      最近更新 更多