某些类添加“fno-objc-arc”后,在xcode 5.0中出现错误

时间:2013-10-03 08:01:28

标签: ios objective-c llvm-clang

我正在研究Xcode 5.0,我将JSON库文件复制到我的项目中,这些文件是用非弧构建的,所以我为这些JSON库编译器源添加了编译器标志“fno-objc-arc”。 这样做后我得到了苹果LLVM 5.o错误。

clang: error: no such file or directory: 'fno-objc-arc'
Command    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

请帮助我解决此错误。

2 个答案:

答案 0 :(得分:6)

如果这是命令行选项and it is,则需要在其前面加一个连字符,例如:

clang -fno-objc-arc ...

如果您只使用fno-objc-arc,它会认为它是您想要编译的文件名,并且抱怨不存在这样的文件,因为它似乎与no such file or directory: 'fno-objc-arc'错误有关。

答案 1 :(得分:0)

请注意-fno-objc-arc.之后 没有新行字符 您可以通过输入-fno-objc-arc点击某处来确保而不是按下回车键。

这解决了我的问题!