Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Set C++ include/linker settings for all projects, not just per project?
Set C++ include/linker settings for all projects, not just per project? [message #1065002] Sat, 22 June 2013 22:58 Go to next message
R G is currently offline R G
Messages: 5
Registered: June 2013
Junior Member
Is there a way so that I can provide settings covering all projects, rather than having to keep entering the same include paths for my boost and static libraries? I have to do this per project which is really annoying.
Re: Set C++ include/linker settings for all projects, not just per project? [message #1065020 is a reply to message #1065002] Sun, 23 June 2013 13:12 Go to previous messageGo to next message
R G is currently offline R G
Messages: 5
Registered: June 2013
Junior Member
anyone? Can't believe after 288 views nobody knows Confused

[Updated on: Sun, 23 June 2013 13:12]

Report message to a moderator

Re: Set C++ include/linker settings for all projects, not just per project? [message #1065023 is a reply to message #1065020] Sun, 23 June 2013 14:12 Go to previous messageGo to next message
a l p o is currently offline a l p o
Messages: 3
Registered: June 2013
Junior Member
I'm somewhat new to Eclipse and had the same question, dude. I'm constantly adding /usr/include/iwanttokillmyself.

Worse, the Google came up with very little.

So, here's my solution...

while(!Google) {
eclipseProject myProject = new eclipseProject;
myProject.tediousManualInclude("/usr/include");
self.scream("DAMMIT!");
project.tediousManualInclude("/usr/local/include/:/usr/include/c++/4.4.7");
}

...not sure why I put so much effort into this post.


---
-[alpo]-
Re: Set C++ include/linker settings for all projects, not just per project? [message #1065024 is a reply to message #1065020] Sun, 23 June 2013 14:25 Go to previous messageGo to next message
a l p o is currently offline a l p o
Messages: 3
Registered: June 2013
Junior Member
Actually, I have a question for you: Eclipse always shows boost header files as unresolved even if I configure -I/usr/include and -I/usr/include/boost. In the preprocessor directives, I have to type the full path (i.e. #include <usr/include/boost/algorithm/string.hpp>). While this particular error goes away, if I try to call mystring.append(1, mystring[1], I still get an Eclipse bug notification (red squiggly line under the method call) that says "Invalid arguments." Even better, the program compiles and in turn, runs like fat kid towards cake.

Any ideas on how to fix this issue? I'd like Eclipse to process the headers appropriately for code completion/debugging prior to compiling and moreover, I absolutely hate red squigglies.


---
-[alpo]-


---
-[alpo]-
Re: Set C++ include/linker settings for all projects, not just per project? [message #1065025 is a reply to message #1065020] Sun, 23 June 2013 14:52 Go to previous messageGo to next message
a l p o is currently offline a l p o
Messages: 3
Registered: June 2013
Junior Member
DUDE! I think I figured out the answer to your original query...

Go to Window -> Preferences -> C/C++ -> Settings -> Discovery Tab -> CDT GCC Built-In Compiler Settings [Shared]

Add the following (or edit as required) to the end of the "Command to get compiler specs" field:

-I/usr/include/boost -I/usr/include/c++/4.4.7 -I/usr/include/c++/4.4.7/x86_64-redhat-linux -I/usr/local/include -I/usr/pgsql-9.2/lib -I/usr/pgsql-9.2/include

Let me know if it workie.



---
-[alpo]-
Re: Set C++ include/linker settings for all projects, not just per project? [message #1065041 is a reply to message #1065020] Mon, 24 June 2013 03:35 Go to previous message
Nobody Mising name is currently offline Nobody Mising name
Messages: 75
Registered: July 2010
Member
Don't think that internal CDT build system is flexible now. Also suppose that most users just go with custom makefile builds, and makefile can be generated by some other tool (CMake, qmake, ...).

Think it is possible just to copy/paste some lines from one .project file to the new one. Also it should be possible to write a plugin for new project wizard where you will be able to check some required libraries and they will be added to project settings.
Previous Topic:gdb-server doesn't copy app_process file
Next Topic:symbol 'CLOCK_PROCESS_CPUTIME_ID' cannot be resolved?
Goto Forum:
  


Current Time: Tue Oct 21 20:05:19 GMT 2014

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

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