Xcode 构建错误 clang 失败



我的iPhone应用程序中缺少某些内容。

我没有成功修复这个错误,这对我来说是一个火星错误......我完全不明白,即使经过多次搜索...

ProcessPCH /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/PrecompiledHeaders/IntraMuros-Prefix-etlohrlrqzwcjicedfazzdvoaqbq/IntraMuros-Prefix.pch.pth IntraMuros/IntraMuros-Prefix.pch normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd "/Users/xyz/iOS - Applications/intramuros-ios/Application"
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 -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 -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-conversion -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/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/IntraMuros-generated-files.hmap -I/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/IntraMuros-own-target-headers.hmap -I/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/IntraMuros-all-target-headers.hmap -iquote /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/IntraMuros-project-headers.hmap -I/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Products/Debug-iphonesimulator/include -I/Users/xyz/iOS -I- -IApplications/intramuros-ios/Application/IntraMuros/Vendors/mapbox-ios-sdk -I/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/DerivedSources/i386 -I/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/IntraMuros.build/Debug-iphonesimulator/IntraMuros.build/DerivedSources -F/Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Products/Debug-iphonesimulator --serialize-diagnostics /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/PrecompiledHeaders/IntraMuros-Prefix-etlohrlrqzwcjicedfazzdvoaqbq/IntraMuros-Prefix.pch.dia -c "/Users/xyz/iOS - Applications/intramuros-ios/Application/IntraMuros/IntraMuros-Prefix.pch" -o /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/PrecompiledHeaders/IntraMuros-Prefix-etlohrlrqzwcjicedfazzdvoaqbq/IntraMuros-Prefix.pch.pth -MMD -MT dependencies -MF /Users/xyz/Library/Developer/Xcode/DerivedData/IntraMuros-cqmesmesegqjxofftymiymllpzow/Build/Intermediates/PrecompiledHeaders/IntraMuros-Prefix-etlohrlrqzwcjicedfazzdvoaqbq/IntraMuros-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

我为此应用程序使用mapbox项目,也许它相关,但我不考虑它?!

真正奇怪的是,该项目的另一个 iOS 开发人员可以使用相同的代码毫无问题地构建和运行......我们是由Github版本化的。

有没有人见过这种类型的错误?

看起来

您在 xCode 项目的Header Search Paths设置中有一个杂散-

不幸的是,除了

使用项目查看器浏览文档之外,没有特别简单的方法可以找到它(您可以使用文本编辑器对其进行编辑,但这可能会使问题恶化)。

基本上,在项目导航器(左窗格)中选择项目文档,然后依次查看项目的"生成设置",然后依次查看每个目标的"生成设置",查找Header Search Paths设置,在显示为粗体的任何地方,您将需要双击并确保没有单个-(或-后跟空格或逗号, 可以解析为单个参数)。

如果不以这种方式找到它,则可能有一个解析为 - 的构建设置,因此请查看"生成设置"的底部,并确保没有设置为 -(或--,)的用户定义变量。

在前缀或链接器标志中,你已告诉 clang 处理名为 -I- 的标志,该标志不是有效标志。 将其删除并重新构建。

最新更新