【问题标题】:Clang LLVM 1.0 ErrorClang LLVM 1.0 错误
【发布时间】:2013-01-09 12:52:05
【问题描述】:

试图添加一个新类别,现在我得到这个错误

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

【问题讨论】:

  • 就像@TonyTheLion 所说,您发布的内容没有错误。如果可以的话,也请发布一些代码,这将有助于找出问题所在。
  • 检查编辑@SimonGermain
  • Xcode 中的文件是红色的吗?
  • 没有一个文件是红色的..只是错误。我想我在 os-x 项目中添加了一个 Objective-c 头文件。但我删除了它,所以我不明白为什么我得到一个错误@SimonGermain

标签: ios objective-c macos clang


【解决方案1】:

您可以执行@Ramy 的建议,也可以简单地从目标构建设置中删除Prefix Header。只需删除该字段的内容,您无法删除实际字段。

【讨论】:

    【解决方案2】:

    您的目标似乎是空的,并且您错误地删除了前缀文件。

    选择您的项目目标(左侧组层次结构顶部的天蓝色图标),选择“目标”下的目标(等于项目名称),然后选择构建阶段标签并将文件添加到编译源码。

    至于前缀文件,您可能需要重新创建它,它的名称为“YourProjectName-Prefix.pch”。这是我的前缀文件的内容:

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

    尝试一下,并考虑到如果出现问题并且您没有时间修复它,您可能总是想从头开始构建一个项目。

    【讨论】:

    • @H2CO3 我看到了 osx 和 ios 标签。
    • @user1779598 主要针对这两行:“clang: error: no such file or directory: '/Users/Home/Developer/tutorial/tutorial/tutorial-Prefix.pch' clang: error: no输入文件”
    【解决方案3】:

    我收到这个错误是因为我不小心给了一个源文件一个 -m 标志而不是一个 -w 标志。这是胖手指。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多