2009-04-08 12:29:50 UTC
How to integrate ant-contrib sensibly with eclipse?
What version of eclipse do you guys use? The classic that comes with integrated ant and C/C++ support through additional plug-ins or the CDT version and a separate installation of ant?
I decided to with the classic version, but I'm not sure if it's any better.. it made it easy to add a new ant builder to my project, but that's about it. How does one manage dependencies? I'd rather not add them twice. Is it possible to make eclipse automatically realize my library paths set in the ant scripts?
Here's a code snippet from my ant build script:
<includepath location="/usr/include/gtkmm-2.4" />
<includepath location="/usr/include/gtkmm-2.4/include" />
<includepath location="/usr/include/glibmm-2.4" />
... and so on...
<libset libs="gtkmm-2.4, glibmm-2.4, glib-2.0, pango-1.0, atk-1.0, gtk-x11-2.0, cairo, jpeg, png, :libtiff.so.4, sigc-2.0" />
(Btw. If anyone can tell me why saying simply tiff instead of :libtiff.so.4 doesn't work, I'm all ears.)
And here's an example line of working "code" from a src file:
#include <gtkmm.h>
I compile the project, no problems..
BUT, eclipse gives me a question mark and claims the above line as: "Unresolved inclusion: <gtkmm.h>"
I can go around this by changing the line to this:
#include <gtkmm-2.4/gtkmm.h>
But I shouldn't have to do that, should I?
Another solution is to add all the dependencies in, addition, also through the incredible annoying graphical ui that eclipse provides so that eclipse will find the headers as well.
There is the ant4eclipse plug-in, but it seems to do exactly the opposite of what I'm looking for. It seems to have experimental features, that makes it possible to read includes from the eclipse configurations. I'd rather do it the other way, set the properties in the ant build file and make eclipse read it. Anybody has any suggestions? How do you do it?