# Classes not resolved on Eclipse CDT

(Hope this isn't overlapping with previous questions...)

On Eclipse, basic ROS files (e.g. ros::{ NodeHanle, Publisher } ) are not resolved. Is something wrong or missing in what I've done?

For example, while I'm doing this tutorial, I did followings (trying to follow IDEs page:

% roscreate-pkg drive_base_tutorial roscpp geometry_msgs
% make eclipse-project                (in the new folder)


Then add "Environment" (ROS_ROOT, ROS_PACKAGE_PATH, PYTHONPATH, PATH) on Eclipse (which was necessary for .cpp files to resolve .h files on Eclipse), then "Proejct"->"Build Project", which returns errors saying the classes are not resolved as mentioned earlier.

make from command line is successful.

I know how to manually add "include" path. I'm just wondering whether make eclipse-project isn't too nice to set include path and all other necessary configuration automatically or not, and the IDEs page can be read as it would do nice things I expect.

Environment: Ubuntu 10.10, Eclipse CDT Indigo

edit retag close merge delete

Sort by » oldest newest most voted

You need to run make eclipse-project again each time that you change the project dependicies. Additionally you need to restart eclipse everytime you do that.

You should have the includes showing up in eclipse, if everything is correct.

more

@Achim thanks. Redoing "make eclipse-project" might have helped setting Environments so that include files are now able to be referred , but still classes like NodeHandle are not resolved...I can even open the files included via Eclipse by clicking file names in .cpp file. Strange.
( 2011-10-07 05:40:34 -0500 )edit
Though weird, I now can resolve, build and run on Eclipse the copied .cpp file from the one that had a problem. Original .cpp is still has problem but that doesn't matter. Still don't know what took the actual effect but thanks!
( 2011-10-07 09:31:19 -0500 )edit