Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Adding path to C/C++ indexer for a project
Adding path to C/C++ indexer for a project [message #107470] Thu, 24 June 2004 17:50 Go to next message
Eclipse UserFriend
Originally posted by: pardsbane.offthehill.org

We are using a standard C++ projects, not the managed make ones, and I
have two projects in my Workspace: A, and B. B includes files from A, so
I'd like to get the C++ Indexer to parse A's headers. Where do I tell
the indexer to look at A's headers?

Also, another trick is that B's include path is A\.., not A. What I mean
is that in a B\foo.cpp, there would be a line like:

#include <A\bar.h>

So if I added project A to the indexer's path, it would look for the
header A\A\bar.h, not A\bar.h, right? Is there a way to add A\.. to the
indexer path?

I hope that makes sense, but just knowing where in the UI to find the
settings would be helpful.

-Josh
Re: Adding path to C/C++ indexer for a project [message #107526 is a reply to message #107470] Thu, 24 June 2004 19:13 Go to previous message
Henning Riedel is currently offline Henning RiedelFriend
Messages: 310
Registered: July 2009
Senior Member
As a recommendation, never use '\' within the includes.
Usually, every compiler should accept the '/' for the paths, even on
Windows.

To add a include path from another project, go to your project settings,
"C/C++ Include Paths & Symbols", select your project in the dialog and
use the "Add Include from Workspace", or if the included project is not
an Eclipse/CDT project within your workspace, the "Add External Include
Path" button. Select the directory and confirm it.

The "Add Contributed" button is for include paths found by the automatic
discovery scanner, which you can set/enable per project under
"C/C++-Make Project" on the last tab "Discovery Options" in your project
settings.

Joshua Pollak wrote:
> We are using a standard C++ projects, not the managed make ones, and I
> have two projects in my Workspace: A, and B. B includes files from A, so
> I'd like to get the C++ Indexer to parse A's headers. Where do I tell
> the indexer to look at A's headers?
>
> Also, another trick is that B's include path is A\.., not A. What I mean
> is that in a B\foo.cpp, there would be a line like:
>
> #include <A\bar.h>
>
> So if I added project A to the indexer's path, it would look for the
> header A\A\bar.h, not A\bar.h, right? Is there a way to add A\.. to the
> indexer path?
>
> I hope that makes sense, but just knowing where in the UI to find the
> settings would be helpful.
>
> -Josh
Previous Topic:bugs
Next Topic:CDT 2.0 M9 - C/C++ Make Project tab
Goto Forum:
  


Current Time: Sun Jun 30 13:53:34 GMT 2024

Powered by FUDForum. Page generated in 0.02419 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top