Re: How to specify paths to be searched for #include files
Re: How to specify paths to be searched for #include files
- Subject: Re: How to specify paths to be searched for #include files
- From: Andreas Grosam <email@hidden>
- Date: Tue, 22 Mar 2005 10:59:02 +0100
On 04.03.2004, at 19:48, Chris Espinosa wrote:
On Mar 3, 2004, at 1:52 PM, Ken Turkowski wrote:
How do you specify paths to be searched for #included files? I think I may have done this once, but it's not obvious to me now.
First, you shouldn't have to.
- If you #include standard C or C++ headers, the compiler knows where (in /usr/include) to look for them automatically.
- If you #include framework headers, you should add the framework to the project using the Project menu Add Frameworks... command. This lets Xcode know where the link library is as well as the headers.
- If you #include your own project headers, you should add the headers to the project with the Project menu Add Files... command. This ensures the headers are indexed for searching and code completion, and also puts them under the purview of the SCM system as well.
[snipped]
well, it doesn't work.
In my case, i have a project which i downloaded from elsewhere. The project links against several third party frameworks where the initial settings of the paths to the frameworks did not match my local locations for these frameworks. So, before i tried to build, i attemped to fix this with manually re-referencing the frameworks to my locations - by selecting the frameworks group and using the info window and using the "Choose" button to locate the framwork.
I supposed, the framework include paths were now setup correctly. Also, now all headers appeared in the "Headers" group in the framework group - like expected, and no file has been rendered in red color.
Nonetheless, while compiling the prefix header, the compiler failed to locate a header within a framework. I checked again the framework in order to find out whether i could locate the header from there through the project window, and the header was in fact there and double clicking opened the header successfully in the editor.
The header file itself was included with a
#include <framework/header.h> include style form within the prefix file. The framework IS NOT installed in a common location for frameworks, though. (It is just a sibling to the project folder.)
The project uses absolute path settings for this framework for locating files.
After that, i removed and added the framework again using the menu "Project" /"Add to Project..." - but with no succees. The header file could not be located by the compiler.
In order to check whether this is some sort of "cache issue", i also cleaned the target, quit Xcode and tried it again, but with no success.
Help is mutch appreciated. Tanks in advance.
Regards
Andreas Grosam
_______________________________________________
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