• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to handle precompiled headers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to handle precompiled headers?


  • Subject: Re: How to handle precompiled headers?
  • From: Chris Espinosa <email@hidden>
  • Date: Sun, 26 Aug 2007 09:53:23 -0700


On Aug 26, 2007, at 9:12 AM, Bengt Nilsson wrote:

I am trying to change the name of a precompiled header for a xcodeproject that I have copied from a "framework demo".
I want to use a different name and location for this file.
But no matter what I do, it always gives an error: file oldname_Prefix.pch not found.
I have been searching through the project for where this is defined, but I can't find it.
The Xcode help on how to create and use pch's (setting GCC_PREFIX_HEADER and GCC_PRECOMPILE_PREFIX_HEADER ) does not help, there is no reaction at all if I impement the instructions there.

If I open the project bundle and look with a text editor inside project.pbxproj, I see 

GCC_PREFIX_HEADER = Oldname_Prefix.pch;, 

for the different configurations, but I cannot figure out how to reach them using the normal project interface. Changing them by find/replace inside project.pbxproj is cheating!

If I Edit Build/Prefix Header it just says $(inherited) for all configurations. Inerited from what?

Hints, anyone?

• If you change the name of the prefix header on disk, then you have to also change the "Prefix Header" build setting to conform to the new name/location.

• The setting for Prefix Header at the target level overrides that of the project level.  For some kinds of projects (where you have multiple similar targets and you want to share precompiled headers) it makes sense to set the Prefix Header at the project level, and let the targets inherit the project setting.  For projects that have many different targets (some apps, some frameworks, some plugins, etc.) it makes more sense to set each target separately.  

In the cases where the Prefix Header is set to the old value at the Target level, you have to change it at the Target level when you change the name.

1) Set the Active Target to the one that's failing to build
2) Choose Project > Edit Active Target and click the Build tab
3) Type "prefix" into the filter box to make it easier to find the Prefix Header build setting
4) Set the value of that build setting to the new name

Chris
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to handle precompiled headers?
      • From: Bengt Nilsson <email@hidden>
References: 
 >How to handle precompiled headers? (From: Bengt Nilsson <email@hidden>)

  • Prev by Date: How to handle precompiled headers?
  • Next by Date: Re: ZeroLink: unknown symbol
  • Previous by thread: How to handle precompiled headers?
  • Next by thread: Re: How to handle precompiled headers?
  • Index(es):
    • Date
    • Thread