xcode Apple LLVM 编译器 4.2 错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15597412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:03:14  来源:igfitidea点击:

Apple LLVM Compiler 4.2 Error

iosobjective-cxcodeclang

提问by ProteanDev

I'm getting this error message whenever I try to compile my xcode project, I've been around searching and applying answers from other related questions, and still not able to solve the issue, so I post this specific question. How can I fix this?

每当我尝试编译我的 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

回答by Obj-Swift

For anyone who is getting LLVM compiler 4.2 error and for whom above solution did not work, Try clean+build or restart XCode / Mac. In my case restarting Xcode did not work but restarting Mac fixed the issue.

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

回答by Dipen Panchasara

as far as i seen the crash log. I think you have set a wrong library path with '-I'

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

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

as you can see it at the staring of the path, which is not supported by Apple LLVM Compiler. Fix it and your problem will be resolved.

正如您在路径的起始处所看到的,Apple LLVM Compiler 不支持该路径。修复它,您的问题将得到解决。

回答by Stuart M

This looks suspicious:

这看起来很可疑:

-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"

It looks like you have an include path that really should just be

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

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

or something similar, but it is probably missing quotes to account for the spaces in the file path. I would look for something like that in your Xcode project settings and wrap the full path in quotes.

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

回答by ProteanDev

It appears that this has something to do with my libraries compiling version. For anyone who has the same problem or close to this problem, please make sure you got the lastest libraries from your device's manufacturers.

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