Xcode 4 – 铛错误

我正在从Xcode 3.5迁移到Xcode 4,同时我正在尝试为AdHoc分发存档我的应​​用程序。
我收到这个错误

预编译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** 

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


更新(跟随MacMade的build议后的报告结果)

所以在Target Build Settings中
其他C标志没有任何内容。
用户标题searchpath中没有任何内容

标题searchpath中 ,我有:

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

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

C / C ++ / Objective-C Apple LLVM compiler ,我从Apple LLVM compiler切换到LLVM GCC并得到以下消息:

 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的更新build议后的报告结果)

所以我提出:

  • ”$(BUILT_PRODUCTS_DIR)/../three20″
  • “$(BUILT_PRODUCTS_DIR)/../../three20″

用户标题searchpath

它的作品!
(注意:我不知道./three20/Build/Products/three20,因为我看到了
can't find <Three20/Three20.h>
如果我这样做,则在构build项目时出现错误。)

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

转到您的目标的构build设置并检查此选项:

  • 其他C标志

如果你有什么东西,你可以用-iquote版本代替它。

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

  • 标题searchpath
  • 用户标题searchpath

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

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

您可以通过将编译器的C / C ++ / Objective-C版本设置设置为LLVM GCC而不是Apple LLVM编译器

编辑

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

根据你如何包含这些东西,你可能希望把这些searchpath放到用户头部searchpath中 ,而不是头部searchpath (如果你用""而不是<> ""包含它们)。
尝试为Three20做到这一点,但离开libxml在这里…

我试过这些解决scheme。 但是我不能或者不为我工作。
我用这种方法解决了这个问题:

我删除了目标的MuseumTests
当您在左侧的常规选项卡中单击您的项目时,会有目标

xcode项目一般常规选项卡

您可以通过selectAppNameTests的 常规选项卡并从下拉列表中select您的应用程序并启用“ 允许testing主机应用程序API ”来解决此问题。

我只是有一个instagram lib的这个问题,我的错误是,我正在导入文件到目标和编译的另一个目标。 这给了我一些头痛。

嗨,大家好,我们做了一些工作…我们有同样的问题,这是很容易解决…首先,你去terminaltypescd cd(拖动文件所在的整个文件夹),然后按回车

在你进入文件夹之后,你必须写下:

pod安装和types返回

像那样的东西….

上次login:8月21日星期三09:19:29在控制台上

WozMac1:〜KrisBasque $ WozMac1:〜KrisBasque $ WozMac1:〜KrisBasque $ WozMac1:〜KrisBasque $ cd WozMac1:〜KrisBasque $ cd / Users / KrisBasque / Documents / QUADDRO / medapp WozMac1:medapp KrisBasque $ pod install分析依赖关系

CocoaPods 0.23.0可用。

(1.3.1)安装FMDB(2.1)使用MBProgressHUD(0.7)使用PSStackedView(1.0)使用可达性(3.1.1)使用TapkuLibrary(0.2.4)安装SDWebImage(3.3)安装libwebp(0.3.0- rc7)生成Pods项目集成客户端项目WozMac1:medapp KrisBasque $

我解决这个问题的方式是确保没有其他的实现文件被链接到你的文件。 链接接口文件是好的,但

这个错误也是由错误的标题导入引起的。

例如,你的类是“yourclass.h”,但是如果你导入“yourclass.m”的方式是错误的,这就是导致这个错误的原因。