ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
main_node.cpp:(.text+0x34c): undefined reference to `ros::NodeHandle::~NodeHandle()'
It's getting the error, so it may be that the link settings are missing. Adding the following to CMakeLists.txt may solve the problem.
target_link_libraries(main_node ${catkin_LIBRARIES})
The part of main_node must be aligned with add_executable.
add_executable(main_node src/main_node.cpp)