• 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: C++ Headers in /usr/include
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ Headers in /usr/include


  • Subject: Re: C++ Headers in /usr/include
  • From: Glen Low <email@hidden>
  • Date: Sat, 18 Feb 2006 09:05:41 +0800

Trenton:

On 18/02/2006, at 5:59 AM, Trenton Schulz wrote:


On Feb 17, 2006, at 7:22 PM, Rush Manbert wrote:

Trenton Schulz wrote:
There are at least three ways I've found to solve this problem and make things compile OK.
* If I move the headers out of /usr/include and update my include path
* If I preprocess the file and comment out all the "# XX" references
* If I put 'extern "C++"' around the class definitions in the include files.
I guess I'm wondering why having the headers in /usr/include/ Blah causes this error when moving them makes them work fine or why I have to protect them if they are under /usr/include. Also is extern C++ standard or should I protect this as well?
I'm just a little confused and curious :)
Thanks in advance,
The most likely explanation is that at some point you modified the headers as described in your second or third option above, then moved those modified headers somewhere else. Now when you perform the first option (move the current headers and change the include paths) you have another include path that is searched first, and the compiler is finding the modified headers on that path.

I know this sounds too stupid to be true, but don't dismiss it out of hand. Pick one of the header file names and search for it in the Finder, searching all of your disks. My guess is that you will find at least one copy in an unexpected location.

No, I tried this out on separate machines with "fresh" includes and it still happened. I also did the Finder/Spotlight search on my development machine and "took care of" any old headers. Same thing. /usr/include seems to be a key.


We had the same gcc "feature" hit us in macstl:

http://www.pixelglow.com/lists/archive/macstl-dev/2005-February/ 000015.html

I think it's a lingering bug in gcc but #pragma GCC system_header might help you.




Cheers, Glen Low


--- pixelglow software | simply brilliant stuff www.pixelglow.com aim: pixglen

_______________________________________________
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: C++ Headers in /usr/include
      • From: Eric Albert <email@hidden>
    • Re: C++ Headers in /usr/include
      • From: Trenton Schulz <email@hidden>
References: 
 >C++ Headers in /usr/include (From: Trenton Schulz <email@hidden>)
 >Re: C++ Headers in /usr/include (From: Rush Manbert <email@hidden>)
 >Re: C++ Headers in /usr/include (From: Trenton Schulz <email@hidden>)

  • Prev by Date: Re: Xcode running on Intel vs PPC
  • Next by Date: Re: XCode Ref Library cannot go to html anchor tags
  • Previous by thread: Re: C++ Headers in /usr/include
  • Next by thread: Re: C++ Headers in /usr/include
  • Index(es):
    • Date
    • Thread