Trying to figure out how to set default includes for Eclipse CDT [message #1699700] |
Thu, 25 June 2015 20:06  |
Eclipse User |
|
|
|
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 #1699867 is a reply to message #1699781] |
Sun, 28 June 2015 01:14  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.06710 seconds