2012-08-09 117 views
-5

我在編程Objective-C,我有這個錯誤,我該如何解決它?我該如何解決錯誤?

CompileC DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/Objects-normal/i386/ioapi-B8F5CE0D70C54AA1.o ioapi.c normal i386 c com.apple.compilers.llvm.clang.1_0.compiler 
    cd /Users/kilovata/Documents/Projects/MyBook 
    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 c -arch i386 -fmessage-length=0 -std=gnu99 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -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-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fexceptions -fasm-blocks -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-conversion -Wno-sign-conversion -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -iquote /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/MyBook-generated-files.hmap -I/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/MyBook-own-target-headers.hmap -I/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/MyBook-all-target-headers.hmap -iquote /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/MyBook-project-headers.hmap -I/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/include/libxml2 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/include/libxml2/libxml -I/Users/kilovata/Documents/Projects/MyBook/SDWebImage -I/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/DerivedSources/i386 -I/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/DerivedSources -F/Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Products/Debug-iphonesimulator -DNS_BLOCK_ASSERTIONS=1 -include /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/PrecompiledHeaders/MyBook-Prefix-ejgtcvngmdefurdjssqldbeazpbs/MyBook-Prefix.pch -MMD -MT dependencies -MF /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/Objects-normal/i386/ioapi-B8F5CE0D70C54AA1.d --serialize-diagnostics /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/Objects-normal/i386/ioapi-B8F5CE0D70C54AA1.dia -c /Users/kilovata/Documents/Projects/MyBook/ioapi.c -o /Users/kilovata/Documents/Projects/MyBook/DerivedData/MyBook/Build/Intermediates/MyBook.build/Debug-iphonesimulator/MyBook.build/Objects-normal/i386/ioapi-B8F5CE0D70C54AA1.o 

clang: error: no such file or directory: '/Users/kilovata/Documents/Projects/MyBook/ioapi.c' 
clang: error: no input files 
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1 
+1

這是模糊的方式,無需代碼或格式錯誤字符串。毫無疑問,這個問題距離被關閉只有幾分鐘的時間。 – 2012-08-09 13:45:39

+0

如果你不告訴更多關於你的問題的事情,你會得到很多贊成票! – 2012-08-09 13:45:49

回答

1

看起來您還沒有將源文件分配給任何Xcode目標。

解決:

  • 突出顯示在Project Explorer(左窗格)每一個源文件。
  • 打開右窗格並選擇最左邊的選項卡。
  • 選擇源文件所屬的目標。
2

沒有真正知道它到底是什麼你的錯誤是,在一般人能弄清楚如何通過執行以下步驟來解決編譯/鏈接錯誤:

  1. 點擊(或雙擊)的錯誤在您的錯誤視圖中(取決於IDE),這應該帶您到您的代碼中的適用區域,該錯誤適用於。
  2. 如果第1步不會將您帶到任何地方(可能是鏈接器錯誤),或者您不確定該行爲什麼會產生錯誤,請嘗試使用Google搜索確切的錯誤消息,並查看結果以查看是否有幫助。
  3. 如果一切都失敗了,你可以來SO併發布描述你的錯誤所需的MINIMUM。發佈您的整個構建日誌並非真的被社區接受