ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

If you haven't linked your *.cpp files in the CMakeLists, you will face this error. As far as I understand, you are including ROSMath.cpp and Math.cpp in your main file and you will only have one executable. You should follow ROS C++ tutorial. The modification here will be instead of adding just one file to your node, you will need to have more than one files linked to the same node. For e.g.

add_executable(foo src/foo.cpp src/bar.cpp src/foo2.cpp)