Question

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

Precompile 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?


UPDATE (report result after followed MacMade's suggestions)

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

In Header Search Paths, I have:

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

but I'm not sure what to change here.

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 

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

So I move:

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

to User Header Search Paths

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.)

Was it helpful?

Solution

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

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

  • Other C flags

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:

  • Header Search Paths
  • User Header Search Paths

Try to manipulate these values, if applicable.

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

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

EDIT

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

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

OTHER TIPS

I tried these solutions. But i couldn't or not working for me.
I solved this problem with this way:

I deleted MuseumTests in targets
When you clicked your project in general tab on left there is targets

xcode project general general tab

You can solve this problem by selecting General tab of AppNameTests and select your app from the drop down list and enable "Allow testing Host Applications APIs"

I just had this problem with an instagram lib, my mistake was that i was importing the files to a target and compiled the other target. It gave me some headaches.

Hi guys we did something that worked... We had the same problem and it was quite easy to solve... First you go to terminal type cd cd (drag the whole folder where your file is in) and press return

after you are inside the folder you have to write:

pod instal and type return

something like that....

Last login: Wed Aug 21 09:19:29 on console

WozMac1:~ KrisBasque$ WozMac1:~ KrisBasque$ WozMac1:~ KrisBasque$ WozMac1:~ KrisBasque$ cd WozMac1:~ KrisBasque$ cd /Users/KrisBasque/Documents/QUADDRO/medapp WozMac1:medapp KrisBasque$ pod install Analyzing dependencies

CocoaPods 0.23.0 is available.

Downloading dependencies Using AFNetworking (1.3.1) Installing FMDB (2.1) Using MBProgressHUD (0.7) Using PSStackedView (1.0) Using Reachability (3.1.1) Installing SDWebImage (3.3) Using TapkuLibrary (0.2.4) Installing libwebp (0.3.0-rc7) Generating Pods project Integrating client project WozMac1:medapp KrisBasque$

The way I solved this was my making sure no other implementation files we're linked to your file. Linking interface files is fine though

This error also caused by wrong header import.

For example your class is "yourclass.h", but in wrong way if you import "yourclass.m" it is cause this error.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top