briancollins / BCTabBarController

a Tweetie-style tab bar for the iPhone
MIT License
568 stars 95 forks source link

Precompiler error - pch file not found error when Archiving for Distribution #16

Closed dkamdar closed 12 years ago

dkamdar commented 12 years ago

Hi,

I am getting following error where I am archiving for distribution only. Its working fine on simulator and even on device with Developer Profile. I followed the example as provided ... not sure what am I missing here?

Compiler Error -

ProcessPCH /Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/Build/PrecompiledHeaders/BCTabBarController_Prefix-gcyegysplhlyxzcibemetstodnez/BCTabBarController_Prefix.pch.pth BCTabBarController_Prefix.pch normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/dk/Projects/2012_01_05_Walking_Cycling/Code/2012_2_23_Part2_Cycling setenv LANG en_US.US-ASCII setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Developer/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=gnu99 -Wno-trigraphs -fpascal-strings -Os -Wmissing-prototypes -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -gdwarf-2 -Wno-sign-conversion -mthumb "-DIBOutlet=attribute((iboutlet))" "-DIBOutletCollection(ClassName)=attribute((iboutletcollection(ClassName)))" "-DIBAction=void)attribute((ibaction)" -miphoneos-version-min=3.2 -iquote /Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/BCTabBarController-generated-files.hmap -I/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/BCTabBarController-own-target-headers.hmap -I/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/BCTabBarController-all-target-headers.hmap -iquote /Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/BCTabBarController-project-headers.hmap -I/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/BuildProductsPath/Release-iphoneos/include -Isrc -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/libxml2 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include/libxml2/libxml -I/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/DerivedSources/armv7 -I/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/IntermediateBuildFilesPath/Cycling.build/Release-iphoneos/BCTabBarController.build/DerivedSources -F/Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/ArchiveIntermediates/Cycling/BuildProductsPath/Release-iphoneos -c /Users/dk/Projects/2012_01_05_Walking_Cycling/Code/2012_2_23_Part2_Cycling/BCTabBarController_Prefix.pch -o /Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/Build/PrecompiledHeaders/BCTabBarController_Prefix-gcyegysplhlyxzcibemetstodnez/BCTabBarController_Prefix.pch.pth -MMD -MT dependencies -MF /Users/dk/Library/Developer/Xcode/DerivedData/Cycling-fsnjilzfxsihaqgbynhlsabjftfr/Build/PrecompiledHeaders/BCTabBarController_Prefix-gcyegysplhlyxzcibemetstodnez/BCTabBarController_Prefix.pch.d

clang: error: no such file or directory: '/Users/dk/Projects/2012_01_05_Walking_Cycling/Code/2012_2_23_Part2_Cycling/BCTabBarController_Prefix.pch' clang: error: no input files Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang failed with exit code 1

briancollins commented 12 years ago

Not a bug.

dkamdar commented 12 years ago

Hey sorry ... thought this was a general forum ... any idea where I can get some help with this? I am banging my head over this for quite some time now. I even deleted all my profiles to make sure this was not a code sign issue.

briancollins commented 12 years ago

I think the prefix path is being set wrongly in the project settings. It should be src/base/prefix.pch.

dkamdar commented 12 years ago

Ok ... found it .. in the xcode project for BCTabBarController ... in Targets -> BCTabBarController -> Build Settings -> Under "Apple LLVM compiler 3.0 - Language" -> Prefix Header -> For Debug its set correctly but for Release, its set to "BCTabBarController_Prefix.pch" ... Looks like you must have updated the file name and path to src/base/prefix.pch and forgot to change this setting.

Thats why its working correctly for debugging but not when I try to build product for distribution.

Hopefully this should help others.

Thanks for the Tab Bar itself. Its really helpful. :)