Skip to main content



      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 18:58 Go to next message
Eclipse UserFriend
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 09:12 Go to previous messageGo to next message
Eclipse UserFriend
anyone? Can't believe after 288 views nobody knows Confused

[Updated on: Sun, 23 June 2013 09:12] by 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 10:12 Go to previous messageGo to next message
Eclipse UserFriend
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 10:25 Go to previous messageGo to next message
Eclipse UserFriend
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]-
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 10:52 Go to previous messageGo to next message
Eclipse UserFriend
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.

Re: Set C++ include/linker settings for all projects, not just per project? [message #1065041 is a reply to message #1065020] Sun, 23 June 2013 23:35 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 16:00:16 EDT 2025

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

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

Back to the top