• 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: file not found - WHY?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file not found - WHY?


  • Subject: Re: file not found - WHY?
  • From: Fritz Anderson <email@hidden>
  • Date: Mon, 15 Dec 2014 11:20:14 -0600

> On Dec 15, 2014, at 4:34 AM, H Miersch <email@hidden> wrote:
>
> Hello..
>
>> (You aren't putting your header name in angle brackets, right?)
>
> Well, some are in < > and others are in " ". What's the difference?
>

Aha.

The preprocessor uses different strategies for angle- and quote-delimited #includes.

The quote strategy is local, starting at the directory containing the current source. It then tries "system" directories like /usr/bin/include. There are compiler switches to add search paths, including frameworks, and to abandon the search without resort to system locations. Build Settings include items for those options and more. Xcode adds paths by default.

Angle-delimited #includes start with the system paths, ignoring user directories. (There is an option to search user locations anyway. Don't use it unless you truly want to override a system header in a file you can't alter. It's error-prone.) If you name a private header in angle brackets, the preprocessor won't find it.

    — F




 _______________________________________________
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: file not found - WHY?
      • From: Jens Alfke <email@hidden>
References: 
 >file not found - WHY? (From: H Miersch <email@hidden>)
 >Re: file not found - WHY? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Can Xcode 4 be used in OS X 10.9 or 10.10?
  • Next by Date: Re: Can Xcode 4 be used in OS X 10.9 or 10.10?
  • Previous by thread: Re: file not found - WHY?
  • Next by thread: Re: file not found - WHY?
  • Index(es):
    • Date
    • Thread