Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trying to figure out how to set default includes for Eclipse CDT(Trying to create new default settings for projects)
Trying to figure out how to set default includes for Eclipse CDT [message #1699700] Fri, 26 June 2015 00:06 Go to next message
Wayman Bell is currently offline Wayman BellFriend
Messages: 3
Registered: June 2015
Junior Member
tldr: Is there a way to make changes to default C++ project settings so that I don't have to manually add the includes paths for every individual project?

Hello all,

I'm using Ubuntu 15.04 and the new Eclipse Mars for C++. I've got the build-essential tools installed (so, g++, gpp, other stuff...) and am using the official Oracle Java 8. This seems to be the most stable way I have found of getting this to all run. I've literally spent the last three months reinstalling the OS and my desired programs in various ways to arrive at this. I'm pretty much a newb to the OS and Eclipse, both. But I digress.

After struggling with Eclipse not liking "#include <iostream>" or "using namespace std;" for quite some time, I finally figured it out, I think. Eclipse is defaulting to my gcc 4.9 files, but my version of gcc is 4.9.2. I've added the 4.9.2 includes directories in my project settings and this cured everything! I still could not compile with gcc, though. I used g++ to compile and everything worked. So now I've figured out how to compile and run both with Eclipse and g++.

I've used this to successfully mess around a bit as I'm reading through my chosen text. Now I'm ready to start doing the chapter exercises and would like to make a different project for each chapter. If I do, though, I have to go back into Project->Properties->C/C++ General->Paths and Symbols->Includes and add the ~4 paths back in for each project. I would really like to set this to happen automatically. Or could someone explain why the 4.9 paths are failing (they are there, it just doesn't work with them).

Thank you in advance!
Re: Trying to figure out how to set default includes for Eclipse CDT [message #1699781 is a reply to message #1699700] Fri, 26 June 2015 14:14 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
If you mean that there are both GCC 4.9 and GCC 4.9.2 installations,
have you tried

sudo apt-get autoremove

to get rid of old versions?


--

Tauno Voipio
Re: Trying to figure out how to set default includes for Eclipse CDT [message #1699867 is a reply to message #1699781] Sun, 28 June 2015 05:14 Go to previous message
Wayman Bell is currently offline Wayman BellFriend
Messages: 3
Registered: June 2015
Junior Member
Hello and thank you very much for your response.

It does seem that both version are installed. Entering "sudo apt-get autoremove" into terminal results in...

"0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."

However, I do not have any problems with any software functioning. I just would like all of my future C++ projects to automatically add paths to, in addition to its standard paths, the 4.9.2 directories.

I've included an image of what my project includes look like after I manually add the 4.9.2 paths. Those four paths are missing from new projects. I would like to have them automatically included in all future projects.
Previous Topic:Eclipse download
Next Topic:Why scanners in the SourceViewerConfiguration and DocumentProvider?
Goto Forum:
  


Current Time: Thu Apr 25 11:31:20 GMT 2024

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

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

Back to the top