ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The issue is that you are not passing in the correct location for g++ to search for headers.
If you don't want to use catkin as a build tool, you need to tell gcc where to find the headers and libraries. Use -i /opt/ros/version-of-ros/include -L /opt/ros/version-of-ros/lib
as a starting point and keep adding the libraries and other locations as required (eg: -lpthread
)
Or simply modify CMakeLists.txt created by catking_create_pkg <you-pkg-name> roscpp roslib
. (Though roslib isn't compulsory)