Skip to main content



      Home
Home » Newcomers » Newcomers » Removing default include paths
Removing default include paths [message #250978] Thu, 06 March 2008 12:56 Go to next message
Eclipse UserFriend
Originally posted by: gary.thorburn.hds.com

I'm new to Eclipse, running 3.3.2 with CDT 4.0.1 on Linux (Fedora Core 6),
using GNU C/C++ tools.

How can I control the default include paths that appear when I create a
project? When I create the supplied Hello World (C++) project, it pulls in
an "Includes" tree of apparently every .h file it finds under /usr. I'd
like to be able to remove the paths that are not needed.

This is important, as I will be compiling using an older version of g++.
I have multiple GNU tools installed. I think I know how to specify the
compiler on a per-project basis, but I don't know how to ensure that the
project seeks the correct include paths.
Re: Removing default include paths [message #250995 is a reply to message #250978] Thu, 06 March 2008 14:24 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Gary,

I'll redirect your question to the CDT newsgroup by adding it to the
"to" list of this reply.


Gary wrote:
> I'm new to Eclipse, running 3.3.2 with CDT 4.0.1 on Linux (Fedora Core
> 6), using GNU C/C++ tools.
>
> How can I control the default include paths that appear when I create
> a project? When I create the supplied Hello World (C++) project, it
> pulls in an "Includes" tree of apparently every .h file it finds under
> /usr. I'd like to be able to remove the paths that are not needed.
>
> This is important, as I will be compiling using an older version of
> g++. I have multiple GNU tools installed. I think I know how to
> specify the compiler on a per-project basis, but I don't know how to
> ensure that the project seeks the correct include paths.
>
>
>
Re: Removing default include paths [message #251028 is a reply to message #250978] Thu, 06 March 2008 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jim.marshall.wbemsolutions.com

Gary wrote:
> I'm new to Eclipse, running 3.3.2 with CDT 4.0.1 on Linux (Fedora Core
> 6), using GNU C/C++ tools.
>
> How can I control the default include paths that appear when I create a
> project? When I create the supplied Hello World (C++) project, it pulls
> in an "Includes" tree of apparently every .h file it finds under /usr.
> I'd like to be able to remove the paths that are not needed.
>
> This is important, as I will be compiling using an older version of
> g++. I have multiple GNU tools installed. I think I know how to
> specify the compiler on a per-project basis, but I don't know how to
> ensure that the project seeks the correct include paths.
>
>
>
Are you saying that you have a bunch of directories listed in the
compilers directories entry? I've not seen Eclipse do that. The compiler
it self has a default include path that it will search, you can override
that with the '-nostdinc' directive (which should be under the
preprocessor options in eclipse)
Re: Removing default include paths [message #251036 is a reply to message #250995] Thu, 06 March 2008 16:57 Go to previous message
Eclipse UserFriend
Originally posted by: gary.thorburn.hds.com

I think I can now answer my own question, thanks in part to the 24 Feb
discussion between Nikosch and Tracy Miranda in the eclipse.tools.cdt
thread. There are two separate issues here:

1) There may in fact be no conflict: g++ / gcc will find the paths
matching its version, if the tools were built correctly and their include
directories have not been molested. I verified this by creating two hello
world projects, assigning different compilers to each. (My system has two
versions installed.) Then I renamed the iostream header file in each path
temporarily, and the proper build for the renamed path failed.

2) Nevertheless, there still might be occasions when deleting a default
path might be desirable. Bug 206372
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=206372) acknowledges an
issue here. A workaround is mentioned in the writeup for this bug which
involves moving, deleting, or editing (depending on your tolerance for
adventure) ${workspace}/.metadata/.plugins/org.eclipse.cdt.make.core
Previous Topic:CDT project: more than one main() method?
Next Topic:How to know if a list allows multiple selection list
Goto Forum:
  


Current Time: Sun May 11 15:29:43 EDT 2025

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

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

Back to the top