2014-06-20 58 views
1

当我尝试在版本的Xcode 5.1.1打开旧项目,proprecompiler一些类与-fobjc -arc标志编译的方式提供了以下错误苹果LLVM 5.1错误

clang: error: unknown argument: '-fobjc' [-Wunused-command-line-argument-hard-error-in-future] 
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future 

你有什么想法如何解决这个问题吗?

+0

我认为自动引用计数可能已启用少数类,你说有些类是用-fobjc -arc标志编号的, – Chan

+0

使用-fno-objc-arc来禁用或-fobjc-arc来启用标志 – Chan

回答

1

看起来你使用了错误的标志。您应该使用-fobjc-arc

0

再次检查您的编译器标志,它看起来像您正在使用-fobjc而不是-fobjc-arc
使用

  • 启用ARC - > -fobjc弧
  • 禁用ARC - > -fno-objc弧