Xcode 4 - 铿锵错误 [英] Xcode 4 - clang error

查看:133
本文介绍了Xcode 4 - 铿锵错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为AdHoc分发存档我的应​​用程序时,从Xcode 3.5迁移到Xcode 4和


我收到此错误

I'm migrating from Xcode 3.5 to Xcode 4 and while I'm trying to Archiving my app for AdHoc distribution.
I received this error

预编译MyApp_Prefix.pch

ProcessPCH /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.pth MyApp_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/return/Projects/iphone-MyApp
setenv LANG en_US.US-ASCII
setenv PATH "/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin:/Xcode4.2/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang -x objective-c-header -arch armv7 -fmessage-length=0 -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -std=c99 -Wno-trigraphs -fpascal-strings -O0 -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -DFAVOURITES_ENABLED=0 -isysroot /Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -gdwarf-2 -fvisibility=hidden -Wno-sign-conversion -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=3.0 -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-generated-files.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-own-target-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-all-target-headers.hmap" -iquote "/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/MyApp-project-headers.hmap" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/BuildProductsPath/Distribution-iphoneos/include" "-I"/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../three20″" "-I"/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp" -I- "-IDistribution/BuildProductsPath/Distribution-iphoneos/../../three20″" -Ithree20/Build/Products/three20 -I/Xcode4.2/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/libxml2 "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/DerivedSources/armv7" "-I/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/IntermediateBuildFilesPath/MyApp.build/Distribution-iphoneos/MyApp.build/DerivedSources" "-F/Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/ArchiveIntermediates/MyApp - Distribution/BuildProductsPath/Distribution-iphoneos" -c /Users/return/Projects/iphone-MyApp/MyApp_Prefix.pch -o /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.pth -MMD -MT dependencies -MF /Users/return/Library/Developer/Xcode/DerivedData/MyApp-cwtxjgdpsvtoyxcfpytllmzaxceb/Build/PrecompiledHeaders/MyApp_Prefix-crxrbmeralwexyefvuwvzexquuin/MyApp_Prefix.pch.d


**clang: error: '-I-' not supported, please use -iquote instead**
**Command /Xcode4.2/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1**

你知道我该怎么做才能解决这个问题吗?

Do you know what I should do to fix this?

所以在目标构建设置中:

我在其他C标志中没有任何内容。

用户标题搜索路径中没有任何内容

So in the Target Build Settings:
I have nothing in Other C flags.
I have nothing in User Header Search Paths

标题搜索路径中,我有:


  • $(BUILT_PRODUCTS_DIR) /../ three20

  • $(BUILT_PRODUCTS_DIR)/../../ three20

  • ./ three20 / Build / Products / three20

  • / usr / include / libxml2

  • "$(BUILT_PRODUCTS_DIR)/../three20″
  • "$(BUILT_PRODUCTS_DIR)/../../three20″
  • ./three20/Build/Products/three20
  • /usr/include/libxml2

但我不知道这里要改变什么。

but I'm not sure what to change here.

Compiler for C / C ++ / Objective-C 设置中,
我从 Apple LLVM编译器切换 LLVM GCC 并收到此消息:

In Compiler for C/C++/Objective-C setting, I switched from Apple LLVM compiler to LLVM GCC and get this message:

cc1obj: note: obsolete option -I- used, please use -iquote instead  
cc1obj: error: -I- specified twice  
cc1obj: note: obsolete option -I- used, please use -iquote instead 






更新(遵循MacMade更新建议后的报告结果)



所以我搬家:


UPDATE (report result after followed MacMade's updated suggestions)

So I move:


  • $(BUILT_PRODUCTS_DIR)/../ three20

  • $(BUILT_PRODUCTS_DIR)/../../ three20

  • "$(BUILT_PRODUCTS_DIR)/../three20″
  • "$(BUILT_PRODUCTS_DIR)/../../three20″

用户标题搜索路径

它有效!!!

(注意:我不移动 ./ t hree20 / Build / Products / three20 因为我看到了
找不到< Three20 / Three20.h>
$如果我这样做,那么在构建项目时会出现b $ b错误。)

and it works!!!
(NOTE: I don't move ./three20/Build/Products/three20 because I see
can't find <Three20/Three20.h>
errors while building the project if I do.)

推荐答案

显然,你已经为包含项设置了自定义编译器标志路径。

Apparently, you've set custom compiler flags for the include paths.

转到目标的构建设置并选中此选项:

Go to your target's build settings and check this option:


  • 其他C标志

如果您有其他内容,可以用 -iquote version。

If you have something in it, you may replace it by the -iquote version.

否则,仍然在构建设置中,检查以下选项的值:

Otherwise, still in the build settings, check the value of the following options:


  • 标题搜索路径

  • 用户标题搜索路径

如果适用的话,尝试操纵这些值。

Try to manipulate these values, if applicable.

否则,您也可以继续使用GCC作为前端,而不是Clang。

Otherwise, you may also continue to use GCC as a fronted, instead of Clang.

您可以通过将编译器for C / C ++ / Objective-C 构建设置设置为 LLVM GCC 而不是 Apple LLVM编译器

You can do this by setting the Compiler for C/C++/Objective-C build setting to LLVM GCC instead of Apple LLVM compiler.

编辑

根据您的编辑,我可以看到您正在使用Three20库。

Based on your edit, I can see you are using the Three20 library.

根据您包含的内容,您可能需要将这些搜索路径设置为用户标题搜索路径,而不是标题搜索路径(如果包含而不是<> )。

尝试为Three20执行此操作,但请将libxml保留在此处...

Depending on how you include that stuff, you may want to put these search paths to the User Header Search Paths, instead of Header search paths (if you include them with "" instead of <>).
Try to do this for Three20, but leave libxml here...

这篇关于Xcode 4 - 铿锵错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆