簡體   English   中英

Clang LLVM 1.0錯誤

[英]Clang LLVM 1.0 Error

試圖添加一個新類別,現在我收到此錯誤

ProcessPCH /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/PrecompiledHeaders/tutorial-Prefix-azwowysritanixcinyybieddtusa/tutorial-Prefix.pch.pth tutorial/tutorial-Prefix.pch normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/Home/Developer/tutorial
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch x86_64 -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 -Wshorten-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/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.8 -g -Wno-sign-conversion "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -iquote /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/tutorial-generated-files.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/tutorial-own-target-headers.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/tutorial-all-target-headers.hmap -iquote /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/tutorial-project-headers.hmap -I/Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Products/Debug/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/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/DerivedSources/x86_64 -I/Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/tutorial.build/Debug/tutorial.build/DerivedSources -F/Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Products/Debug --serialize-diagnostics /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/PrecompiledHeaders/tutorial-Prefix-azwowysritanixcinyybieddtusa/tutorial-Prefix.pch.dia -c /Users/Home/Developer/tutorial/tutorial/tutorial-Prefix.pch -o /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/PrecompiledHeaders/tutorial-Prefix-azwowysritanixcinyybieddtusa/tutorial-Prefix.pch.pth -MMD -MT dependencies -MF /Users/Home/Library/Developer/Xcode/DerivedData/tutorial-dmhshuqgvfykctbdzxopvinwcvpd/Build/Intermediates/PrecompiledHeaders/tutorial-Prefix-azwowysritanixcinyybieddtusa/tutorial-Prefix.pch.d

clang: error: no such file or directory: '/Users/Home/Developer/tutorial/tutorial/tutorial-Prefix.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

看來您的目標是空的,並且您刪除了前綴文件是錯誤的。

選擇項目目標(左側組層次結構頂部的藍色圖標),在“目標”下選擇目標(等於項目名稱),然后選擇構建階段標簽並將文件添加到編譯源。

至於前綴文件,您可能要重新創建它,其名稱為“ YourProjectName-Prefix.pch”。 這是我的前綴文件的內容:

#ifdef __OBJC__
    #import <Cocoa/Cocoa.h>
#endif

嘗試一下,並考慮到如果出現問題並且沒有時間修復它,您可能總是想從頭開始構建項目。

您可以執行@Ramy的建議,也可以從目標構建設置中刪除Prefix Header 只需刪除該字段的內容,就不能刪除實際的字段。

目標構建設置

我收到此錯誤是因為我不小心給了源文件-m標志而不是-w標志。 這是胖手指。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM