【问题标题】:Apple LLVM Compiler 4.2 ErrorApple LLVM 编译器 4.2 错误
【发布时间】:2013-03-24 10:34:46
【问题描述】:

每当我尝试编译我的 xcode 项目时,我都会收到此错误消息,我一直在搜索和应用其他相关问题的答案,但仍然无法解决问题,所以我发布了这个特定问题。我该如何解决这个问题?

ProcessPCH "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/PrecompiledHeaders/Project Name-Prefix-dyzfahcpvwmwmcbbcszxksgksawt/Project Name-Prefix.pch.pth" "Company/Project Name-Prefix.pch" normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/ObsidianSword/Dropbox/ProjectName - iOS Projects Folder/Official Projects/Project Name (Company 3.3.3.2)"
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 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=5.0 -iquote "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/ProjectName-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-generated-files.hmap" "-I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-own-target-headers.hmap" "-I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-all-target-headers.hmap" -iquote "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/ProjectName-project-headers.hmap" -I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Products/Debug-iphonesimulator/include -I/Users/ChristianD/Applications/link_os_sdk/iOS/v1.1.5266/lib/include -I/Users/ObsidianSword/Dropbox/Company -I- -IiOS -IProjects -IFolder/Official -IProjects/Project -ISolution "-I(Company" "-I3.3.3.2)/../ReaderAPI-iOS-0.7/ReaderAPI-iOS-0.7" -I/Users/ObsidianSword/Dropbox/Company -I- -IiOS -IProjects -IFolder/Official -IProjects/Open -ISolution "-I(Company" "-I3.3.3.2)/../ReaderAPI-iOS-1.0/ReaderAPI-iOS-1.0" -I/Users/ObsidianSword/Dropbox/Company -I- -IiOS -IProjects -IFolder/Official -IProjects/Open -ISolution "-I(Company" "-I3.3.3.2)/Company/lib/include" "-I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/DerivedSources/i386" "-I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectName.build/DerivedSources" -F/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Products/Debug-iphonesimulator -DNS_BLOCK_ASSERTIONS=1 --serialize-diagnostics "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/PrecompiledHeaders/ProjectName-Prefix-dyzfahcpvwmwmcbbcszxksgksawt/ProjectName-Prefix.pch.dia" -c "/Users/ObsidianSword/Dropbox/Company - iOS Projects Folder/Official Projects/Project Name (Company 3.3.3.2)/Company/Project Name-Prefix.pch" -o "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/PrecompiledHeaders/ProjectName-Prefix-dyzfahcpvwmwmcbbcszxksgksawt/ProjectName-Prefix.pch.pth" -MMD -MT dependencies -MF "/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/Project Name-bkinddajwtvxeybjhjlenxyuhuxu/Build/Intermediates/PrecompiledHeaders/Project Name-Prefix-dyzfahcpvwmwmcbbcszxksgksawt/Project Name-Prefix.pch.d"
clang: error: '-I-' not supported, please use -iquote instead
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

【问题讨论】:

  • 这行让我很困扰:clang: error: '-I-' not supported, please use -iquote instead Command

标签: ios objective-c xcode clang


【解决方案1】:

对于遇到 LLVM 编译器 4.2 错误且上述解决方案不起作用的任何人,请尝试 clean+build 或重新启动 XCode / Mac。在我的情况下,重新启动 Xcode 不起作用,但重新启动 Mac 解决了这个问题。

【讨论】:

    【解决方案2】:

    就我看到的崩溃日志而言。 我认为您使用“-I”设置了错误的库路径

    -I/Users/ObsidianSword/Library/Developer/Xcode/DerivedData/ProjectName-bkinddajwtvxeybjhjlenxyuhuxu/Build/Products/Debug-iphonesimulator/include
    

    正如您在路径的凝视处看到的那样,Apple LLVM 编译器不支持该路径。 修复它,您的问题就会得到解决。

    【讨论】:

    • 我的目标项目设置中的标题和库搜索路径上没有这个“-I”的东西。
    【解决方案3】:

    这看起来很可疑:

    -I/Users/ObsidianSword/Dropbox/Company -I- -IiOS -IProjects -IFolder/Official -IProjects/Project -ISolution "-I(Company" "-I3.3.3.2)/../ReaderAPI-iOS-0.7/ReaderAPI-iOS-0.7"
    

    看起来你有一个真正应该是的包含路径

    -I"/Users/ObsidianSword/Dropbox/Company - iOS Projects Folder/Official Projects/ProjectName (Company 3.3.3.2)/../ReaderAPI-iOS-0.7/ReaderAPI-iOS-0.7"
    

    或类似的东西,但它可能缺少引号来解释文件路径中的空格。我会在您的 Xcode 项目设置中查找类似的内容,并将完整路径用引号括起来。

    【讨论】:

      【解决方案4】:

      这似乎与我的库编译版本有关。 对于遇到相同问题或接近此问题的任何人,请确保您从设备制造商处获得了最新的库。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-03-09
        • 1970-01-01
        • 1970-01-01
        • 2011-12-26
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多