加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

xcode – iOS 6.0 Apple LLVM编译器4.1错误

发布时间:2020-12-14 17:21:49 所属栏目:百科 来源:网络整理
导读:将 Xcode更新为最新版本,现在尝试编译现有项目时出现奇怪的编译器错误.我认为这是一些需要改变的构建设置,但无法解决问题. Apple LLVM Compiler 4.1 errorclang: error: the clang compiler does not support '-fobjc-abi-version=0'Command /Applications/X
将 Xcode更新为最新版本,现在尝试编译现有项目时出现奇怪的编译器错误.我认为这是一些需要改变的构建设置,但无法解决问题.

Apple LLVM Compiler 4.1 error
clang: error: the clang compiler does not support '-fobjc-abi-version=0'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

这是什么意思?

解决方法

从 clang manpage:

-fobjc-abi-version=version
           Select the Objective-C ABI version to use. Available versions are 1
           (legacy "fragile" ABI),2 (non-fragile ABI 1),and 3 (non-fragile
           ABI 2).

从这个stackoverflow answer:

The non-fragile ABI refers to the ability to add instance variables to
a class without requiring recompilation of all subclasses.

I.e. in v1 (there really aren’t true versions of ObjC),if Apple were
to add an instance variable to,say,NSView (on Cocoa,32 bit),then
every subclass of NSView (or subclass of subclass) would have to be
recompiled or they would blow up. v2 and v3 fix this.

因此,在我看来,您希望删除该选项并重新编译所有内容.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读