• 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: Header Search Paths / Multiple Header Files with the same name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Header Search Paths / Multiple Header Files with the same name


  • Subject: Re: Header Search Paths / Multiple Header Files with the same name
  • From: "Stuart A. Malone" <email@hidden>
  • Date: Fri, 14 Jul 2006 16:39:33 -0400


On Jul 14, 2006, at 4:23 PM, Aaron Kobayashi wrote:

How can I specify which header is matched when doing #include "File_a.h" in a source file? I've tried using the "User Header Search Path" build option for each target, but that doesn't seem to help the situation. I want to avoid having to use multiple projects as the XCode documentation seems to recommend the "one project multiple targets" paradigm over the "multiple projects hierarchy" approach

In my experience, Xcode is simply buggy when it comes to distinguishing between two header files with the same name. In addition to the User Header Search Path, Xcode seems to automatically create a search path containing the directories of all your source files, and to search that path before the one you specify. In fact, I've seen situations where simply re-ordering the source files in a project would change which header file was loaded.


I know of two ways of dealing with this:

	- Rename one of the headers to have a distinctive name.

	- Distinguish the header files by partial path, as in:

		#include "Parser/File_a.h"
		#include "Conduit/File_a.h"


Best wishes,

--Stuart A. Malone
  Llamagraphics, Inc.
  Makers of Life Balance personal coaching software
  http://www.llamagraphics.com/


_______________________________________________ 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: Header Search Paths / Multiple Header Files with the same name
      • From: Steve Checkoway <email@hidden>
References: 
 >Header Search Paths / Multiple Header Files with the same name (From: Aaron Kobayashi <email@hidden>)

  • Prev by Date: Header Search Paths / Multiple Header Files with the same name
  • Next by Date: Re: No Crash Report dialog
  • Previous by thread: Header Search Paths / Multiple Header Files with the same name
  • Next by thread: Re: Header Search Paths / Multiple Header Files with the same name
  • Index(es):
    • Date
    • Thread