Re: What's with XCode not locating my '.pch' files?
Re: What's with XCode not locating my '.pch' files?
- Subject: Re: What's with XCode not locating my '.pch' files?
- From: Chris Espinosa <email@hidden>
- Date: Sat, 19 Jun 2004 22:50:33 -0700
On Jun 19, 2004, at 9:39 PM, Lance Drake wrote:
> In the 'project.pbxproj' file - (which I only looked at after much
> head-scratching to see if there was something OBVIOUSLY wrong...) and
> it showed:
>
> 32CA4F630368D1EE00C91783 = // this file in question...
> {
> explicitFileType = sourcecode.c.h;
> fileEncoding = 4;
> isa = PBXFileReference;
> name = Panther_Prefix.pch;
> path = PrefixFiles/Panther_Prefix.pch;
> refType = 4;
> sourceTree = "<group>";
> };
>
> buildSettings = // project settings
> {
> COPY_PHASE_STRIP = NO;
> DEBUGGING_SYMBOLS = YES;
> GCC_DYNAMIC_NO_PIC = NO;
> GCC_ENABLE_FIX_AND_CONTINUE = NO;
> GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
> GCC_INPUT_FILETYPE = automatic;
> GCC_OPTIMIZATION_LEVEL = 0;
> GCC_PFE_FILE_C_DIALECTS = "";
> GCC_PRECOMPILE_PREFIX_HEADER = YES;
> GCC_PREFIX_HEADER = PrefixFiles/Panther_Prefix.pch;
> INFOPLIST_FILE = PlistFiles/Info.plist;
> OPTIMIZATION_CFLAGS = "-O0";
> PREBINDING = YES;
> ZERO_LINK = NO;
> };
>
> The 'precompile' does not seem to happen - AND... if I specifically
> include the file into the header in my source... an error reports:
> "/Volumes/dev/MyProject/Utils/PUtils.c:25:32: Panther_Prefix.pch: No
> such file or directory"
>
> Everytime I think I am facing a bug - that bug tuens out to be ME in
> the mirror - so I am not complaining, only wish to know, is it Memorex
> - or is it me? I'll be happy to file a bug-report, assuming it's
> determined there actually IS a bug.
CodeWarrior users often use .pch as the extension for the header file
to be precompiled, and include the resulting precompiled header with
some other file name and extension.
Xcode is slightly different, and in one very important way: .pch files
are the product of precompilation, not the input.
Your GCC_PREFIX_HEADER file should be a .h file, a real header file.
Xcode will automatically generate and keep track of the resulting .pch
file for you; you don't need to refer to it explicitly in your project
anywhere.
I understand that there's mental gear-grinding that happens when moving
from CW's precompiled header paradigm to Xcode's. Once you get used to
it it's fairly sensible, but it is a change.
Chris
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.