Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » [SOLVED] pathes in a useful way
[SOLVED] pathes in a useful way [message #726403] Sat, 17 September 2011 22:26 Go to next message
manu311  is currently offline manu311 Friend
Messages: 4
Registered: September 2011
Junior Member
Hey, I've been developing c++ for years with a default text editor and makefiles & commandline commands.
Lateley I took some break to switch to java and I got used to eclipse.
So now I don't want to return to my old editor and installed CDT.
I can write projects, I can even compile them.
Anyways I have a big problem. The only way I see to add include paths and librarys is each by hand. Given a very little framework, there will be around 100 actions I have to do.
I see 2 solutions for that:
1. Let CDT use pkg-config to define the includes and libraries.
2. Add includepaths and libraries recursively (and don't tell me I should #include <whatever/framework.h>).

Now both solutions aren't perfect, and I didn't managed to even get one to work. So for the moment I'm back to console compileation.

Hopefully someone knows a way out of this (since I don't beliefe that all of you include 5000 files by hand if you include e.g. qt)

[Updated on: Sun, 18 September 2011 21:18]

Report message to a moderator

Re: pathes in a useful way [message #726503 is a reply to message #726403] Sun, 18 September 2011 11:23 Go to previous messageGo to next message
manu311  is currently offline manu311 Friend
Messages: 4
Registered: September 2011
Junior Member
*PUSH*
Now I found a solution how I get at least a compiled file out of eclipse without the use of a commandline.
I added the pkg-config command to misc-flags for the compiler.
Someone wrote somewhere if I compile it nicely eclipse will include all the paths which are used. Well, I do compile correct, it does:
#include "..." - Search starts here:
#include <...> - Search starts here:
*all the include directorys next*

I'm not sure if this is from g++ or CDT, but it looks good.

Anyways, CDT still doesn't find the includes itself, and so I can't benefit from those useful features.

Could plz someone point me what I've been missing?
Re: pathes in a useful way [message #726574 is a reply to message #726503] Sun, 18 September 2011 18:28 Go to previous messageGo to next message
manu311  is currently offline manu311 Friend
Messages: 4
Registered: September 2011
Junior Member
Well thanks to this marketplace project: "pkg-config-support-eclipse-cdt"
I got pkg-config into my project - it automatically adds all the librarys and the includes. But the includes are only in the C compiler includes, not in c++. And therefor they don't work in c++ projects.

still not fixed ....
How can I tell g++ to use the gcc flags?
Re: pathes in a useful way [message #726588 is a reply to message #726574] Sun, 18 September 2011 21:17 Go to previous message
manu311  is currently offline manu311 Friend
Messages: 4
Registered: September 2011
Junior Member
alright, I found a tricky way to do it now.
With the use of the tool mentioned in my last post, I added the pkgconfig includes to Gnu C Compiler includes and the libraries to Gnu C++ Linker.
God know's why it doesn't add the includes to Gnu C++ Compiler, anyways, I've done this by manually editing the .cproject file (done a fake Gnu C++ Compiler include to find where I should insert the includes).

With the Includes in both Compilers it is working.

I've created a Bug report for the plugin, hopefully they'll add the C++ part.

Anyways, I'd say "solved"
Previous Topic:Re-appearing sub-projects
Next Topic:Eclipse Helios crash in Fedora 14
Goto Forum:
  


Current Time: Fri Apr 26 19:10:08 GMT 2024

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

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

Back to the top