2012-08-24 36 views
0

我正在编译新的iPhone项目中的ASIHTTPRequest,并在编译时遇到重大错误。iPhone上的ASIHTTPRequest编译错误 - `set`

的错误是:

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

在分析了编译字符串,只有1其中“设置”出现的地方,它是在这一行:

set -fno-objc-arc --serialize-diagnostics 

因此,也许这是失败?

如果是这样,我该如何利用这条线来构建它?

完整的编译字符串:

ProcessPCH /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter- bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/PrecompiledHeaders/ArrestsPlotter-Prefix- asfyhfrzleolpzgggflhpvakdbtg/ArrestsPlotter-Prefix.pch.pth ArrestsPlotter/ArrestsPlotter-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler 
cd /Users/willmoss26/Documents/XCode/ArrestsPlotter 
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 -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-sign-compare -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/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -iquote /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/ArrestsPlotter-generated-files.hmap -I/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/ArrestsPlotter-own-target-headers.hmap -I/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/ArrestsPlotter-all-target-headers.hmap -iquote /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/ArrestsPlotter-project-headers.hmap -I/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/DerivedSources/i386 -I/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/ArrestsPlotter.build/Debug-iphonesimulator/ArrestsPlotter.build/DerivedSources -F/Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Products/Debug-iphonesimulator set -fno-objc-arc --serialize-diagnostics /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/PrecompiledHeaders/ArrestsPlotter-Prefix-asfyhfrzleolpzgggflhpvakdbtg/ArrestsPlotter-Prefix.pch.dia -c /Users/willmoss26/Documents/XCode/ArrestsPlotter/ArrestsPlotter/ArrestsPlotter-Prefix.pch -o /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/PrecompiledHeaders/ArrestsPlotter-Prefix-asfyhfrzleolpzgggflhpvakdbtg/ArrestsPlotter-Prefix.pch.pth -MMD -MT dependencies -MF /Users/willmoss26/Library/Developer/Xcode/DerivedData/ArrestsPlotter-bafbkfhslokdxwcjmtzgipqcqgiv/Build/Intermediates/PrecompiledHeaders/ArrestsPlotter-Prefix-asfyhfrzleolpzgggflhpvakdbtg/ArrestsPlotter-Prefix.pch.d 

非常感谢:)

回答

1

没有理由为set在那里。人们通常只能逐个文件地设置-fno-objc-arc,所以在设置时可能会出现复制和粘贴错误。

选择您正在建设的目标,到构建阶段部分,并在编译源代码,编辑编译器标志删除set

0

唉唉我回答我自己....没关系!

答案是,我已经将“set”添加到整个源代码的编译行中,而不是只添加适当的标志。所以编译器被问到'设置了什么'?

Stuuupid:对

1

您可能想要使用不同的库:ASIHTTPRequestno longer being supported by its creator

NSURLRequest/NSURLConnection在iOS5中使用起来更容易,所以这是一种选择。我最近将一些使用ASIHTTPRequest的项目转换为使用新的NSURL,并且可以证明那里的改进。

AFNetworking是一种正在流行的新框架。我目前正在使用它来构建一个项目并且非常喜欢它;它将所有的工作都用掉了JSON/XML。

+0

谢谢,我会看看那个 – Imme22009