Eclipse not resolving anything
I recently got eclipse setup and loaded the catkin project into it. However it seems incapable of resolving anything in the project. Not even standard math functions like atan or sqrt. I am running eclipse from the terminal.
I tried making a simple C program to make sure that nothing was wrong with the compiler in general, and it worked fine.
I've tried rebuilding the project with these options:
catkin_make --force-cmake -G"Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8
I also tried rebuilding the index, as well as adding in the usual default C paths as outlined in this thread: http://answers.ros.org/question/68074/eclipse-and-catkin-problems-symbol-could-not-be-resolved/
Beyond this I don't know what else could be wrong. I had eclipse run a search and apparently all of the includes are unresolved in the project. Even cmath isn't being found.
The include paths that exist in the project are:
#ROS_BUID_SHARED_LIBS=1
#ROS_PACKAGE_NAME="rov1_control"
/usr/src/gtest/include
/usr/src/gtest
/home/rosbox/catkin_ws/rov1_control/include
/opt/ros/groovy/include
/usr/include
/usr/include
/home/rosbox/catkin_ws/devel/include
/home/rosbox/catkin_ws/src/beginner_tutorials/include
/home/rosbox/catkin_ws/src/learning_tf/include
I did notice that when I first imported the project that it didn't bring in any other environment variables. I had to manually add ROS_ROOT, ROS_PACKAGE_PATH, PYTHONPATH, and PATH. I have my .bashrc set to source setup.sh, and noticed this continued even after I manually resourced the session.
The environment variables that I see under the C/C++ Make Project menu are:
CMAKE_NO_VERBOSE
VERBOSE
I'm not sure what else to try to solve this. Has anyone encountered this before? Thanks!
EDIT: Just another observation to add. When I initially load eclipse it seems to be happy with the C++ math functions like atan2, but as soon as I go to edit anything it seems to lose those references.
EDIT 2: Solution found!
The default includes were insufficient, so I started manually adding in includes from a working C++ hello world project until it stopped giving me errors. My includes list is as follows:
/home/rosbox/catkin_ws/devel/include
/opt/ros/groovy/include
/usr/include
/usr/include/c++/4.6
/usr/include/c++/4.6/backward
/usr/include/c++/4.6/i686-linux-gnu/
/usr/include/c++/4.6/i686-linux-gnu/bits/c++config.h
/usr/include/i386-linux-gnu/
/usr/lib/gcc/i686-linux-gnu/4.6/include
/usr/lib/gcc/i686-linux-gnu/4.6/include-fixed
/usr/local/include
Followed by the various project directories.
I also have similar problem when I am trying to use serial package of ROS