• 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
Use caution when using precompiled headers with XCode 1.1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use caution when using precompiled headers with XCode 1.1


  • Subject: Use caution when using precompiled headers with XCode 1.1
  • From: Timothy Standing <email@hidden>
  • Date: Mon, 26 Jan 2004 09:30:57 -0800

If you use precompiled headers with XCode 1.1, you should be aware of a bug which may trip you up. If you clean your project, your precompiled headers will not be deleted. A subsequent build of your project will use the original precompiled headers and will not generate new ones. This behavior is different than ProjectBuilder.

The following are a few of the scenarios where this will cause problems:

- You replace a library or framework with a new version which has different headers. You then clean and rebuild the project. You will have rebuilt it with the old headers and no new precompiled headers were generated. You must first modify the .pch file or touch it before rebuilding it to recompile the precompiled headers.

- Your headers contain different declarations or macro definitions for Development or Deployment build styles. You switch between the two and perform a Clean followed by a Build expecting the macros to change to the new build style. You will have rebuilt your target with the macro definitions using the old build style. You must first modify the .pch file or touch it before rebuilding it to get the correct macro definitions for the new build style.

- You have a scripted build system which uses xcodebuild. It issues the command "xcodebuild clean" followed by "xcodebuild -buildstyle Development" to build the final release version of your product. This will be build a release version of your product without recompiling the headers. This means that if your last build in XCode was a development build using development macro definitions, you will now be using those macro definitions for your final release product.

I spent a couple days tripping over this one and finally nailed it down. I wrote this note to help prevent others from experiencing the same frustration.

(This bug has already been entered in Apple's Bug Reporter as bug #3536366.)

	Tim Standing
	SoftRAID, LLC
_______________________________________________
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.

  • Prev by Date: Service Development
  • Next by Date: Re: Debugging a privileged process
  • Previous by thread: Service Development
  • Next by thread: Source trees & include paths
  • Index(es):
    • Date
    • Thread