ios - Clang 在 objective-c 中因退出代码 1 错误而失败

标签 ios objective-c ios5 clang xcode4.5

这是什么错误。我正在尝试将非 ARC 项目转换为 Arc 项目,但显示错误
Command/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault。 xctoolchain/usr/bin/clang 失败,退出代码为 1

ProcessPCH /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/PrecompiledHeaders/Corlocation-Prefix-fjwexhbcqsylinfenhkyculomcng/Corlocation-Prefix.pch.pth Corlocation/Corlocation-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Users/amit/Desktop/My Apps/Corlocation"
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch i386 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -mios-simulator-version-min=6.0 -iquote /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/Corlocation-generated-files.hmap -I/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/Corlocation-own-target-headers.hmap -I/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/Corlocation-all-target-headers.hmap -iquote /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/Corlocation-project-headers.hmap -I/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/DerivedSources/i386 -I/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/Corlocation.build/Debug-iphonesimulator/Corlocation.build/DerivedSources -F/Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Products/Debug-iphonesimulator fno-objc-arc --serialize-diagnostics /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/PrecompiledHeaders/Corlocation-Prefix-fjwexhbcqsylinfenhkyculomcng/Corlocation-Prefix.pch.dia -c "/Users/amit/Desktop/My Apps/Corlocation/Corlocation/Corlocation-Prefix.pch" -o /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/PrecompiledHeaders/Corlocation-Prefix-fjwexhbcqsylinfenhkyculomcng/Corlocation-Prefix.pch.pth -MMD -MT dependencies -MF /Users/amit/Library/Developer/Xcode/DerivedData/Corlocation-gfdftvxjfdzkejebtysirafavnmv/Build/Intermediates/PrecompiledHeaders/Corlocation-Prefix-fjwexhbcqsylinfenhkyculomcng/Corlocation-Prefix.pch.d

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

最佳答案

你正在使用 fno-objc-arc 这是一个命令行参数,你可能需要在它前面加上连字符,例如 with:

fno-objc-arc 替换为 -fno-objc-arc

关于ios - Clang 在 objective-c 中因退出代码 1 错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19724447/

相关文章:

objective-c - iOS:访问设备硬件音频音量控制

ios5 - 使用 Storyboard 显示模态视图 Controller 时如何更改大小?

ios - Objective-C 奇怪的解压缩行为导致文件损坏

iOS:授予服务器 Twitter 访问权限?

ios - 多个 UICollectionViewCell 颜色一起更改问题

iOS:UIView 可以知道它的布局过程已经完成吗?

objective-c - 在 Cocoa 中调试 KVO/Bindings 的工具

iphone - UIButton 作为 UITextfield 的 subview

ios - 使用 avfoundation 时 - 裁剪在显示层中表示的捕获图像的可见部分

iOS UITextField 和 NSTimer 奇数