ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
.. add_executable(example src/example.cpp) target_link_libraries(example ${catkin_LIBRARIES}) ... catkin_package( ... )
Please move the add_executable(..)
and target_link_libraries(..)
lines below the catkin_package(..)
line. Delete your build
and devel
folders and rebuild your workspace. That should make things work.
This is slightly unintuitive, but it is documented. See wiki/catkin - CMakeLists.txt - Overall Structure and Ordering on the ROS wiki.