Re: C++ Headers in /usr/include
Re: C++ Headers in /usr/include
- Subject: Re: C++ Headers in /usr/include
- From: Rush Manbert <email@hidden>
- Date: Fri, 17 Feb 2006 10:22:43 -0800
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.
Another (probably better) approach is to perform your first step (move
headers and change paths), then open one of your failing sources and
have Xcode preprocess it for you. Preprocess is available at the bottom
of the Build menu. When it finishes, it pops up a window that contains
the preprocessed source. You can see how the headers expanded, and it
also seems to display the full path names to the header and source files
that it used. Check the paths that are shown.
Regards,
Rush
_______________________________________________
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