How to call ros functions from an external .cpp or .c file?
Hello All,
I am trying to access some of the ROS functions like ros::init(), ros::ok(), from outside of the CATKIN_WORKSPACE.
ros.h is included by adding
/opt/ros/kinetic/include/ path.
The header file gets linked but when I am trying to access some of the ros functions, it throws errors like : undefined reference to ros::init(); : undefined reference to ros::ok(); etc.
Can I get some suggestion on this issue?
Thank you in advance.
Hello ,
Can anyone suggest me some solution ?
If you get this kind of error at the linking stage, it means that the ROS libraries containing the function definitions are not found. What do you mean by "trying to access some of the ROS function outside of CATKIN"? Are you using a Makefile/CMake you created ?