2012-08-24 37 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