Ah, ok! Figured it was an actual 'eclipse' project causing the problems.

Forgetting about ros for a bit, using eclipse with cmake projects can be done two ways.

1) Use cmake to build a true 'eclipse' project.

This is what your 'make eclipse-project' does.

The full visual ide experience. I tried doing this a long time ago (pre-ros) and eventually gave up on this method. It's got alot of constraints and doesn't give me any real advantage over 2) below. Start wanting to do things like multiple binaries/libraries, unit tests, custom cflags or even supporting multiple toolchains in the one project starts getting really messy (often impossible). Great for simple hello world projects, but hard to sustain past that.

2) Put a make wrapper around the cmake (ros style) and create a new makefile based project in eclipse.

You set your basic execution instructions in the make wrapper, then you can do a typical parallel build like autotools, e.g. make xxx-my_platform-xxx, make, make install. All the build stuff is in the cmakelists.txt. This is simple, flexible and you get the highlighting/indexing in eclipse. This worked for me for a while, was great for building on mutiple platforms, and then ros came along with the same setup.

So with ros, I just go 'File->New->C++ Project->'. Supply project name, cancel default location and point at your package, and choose empty makefile project for the project type.

********************

I just create new makefile projects in this manner for ros. This is the easiest way I think, otherwise you're fighting with everything that ros provides.

Actually, philosophically its a bit strange 1) discards all the awesome power of the fabulous rosxxx tools. Why use ros?

2) just complements the rosxx tools with indexing and convenient editor search/highlighting. It may just be personal preference, but so far, I haven't noticed any real disadvantage to doing it like this.

On 16 December 2010 13:37, nitinDhiman <nitinkdhiman@gmail.com> wrote:

Greetings,
Thanks Alex and Daniel for such a detailed explanation of setup.
@Alex: I had set variable this very process. And append variables to native
environments are selected.

@Daniel: I am running 'make eclipse-project' in terminal first before
importing package in eclipse. This creates eclipse project related files for
package. I have been doing equivalent to this script given by you. I had set
ROS environment variables in .bashrc .
Environment variables were visible if I go to project properties ->C/C++
Make Project->environment tab.
But somehow environment variable are not automatically getting populated in
Run configuration and Debug configurations. This is whhere manual feeding is
needed! This I had checked for other packages as well. Is this odd??

Build and clean works well for project. I hope current setup is standard.
Thank you
Nitin


--
View this message in context: http://ros-users.122217.n3.nabble.com/Eclipse-projects-tp1743186p2096513.html
Sent from the ROS-Users mailing list archive at Nabble.com.
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users



--
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Ros : http://www.ros.org/wiki/eros
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl