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

Revision history [back]

click to hide/show revision 1
initial version

You need to install the required targets. For more about this see this link: https://docs.ros.org/en/foxy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Cpp-Publisher-And-Subscriber.html#cmakelists-txt

add_executable(helloWorld src/helloWorld.cpp)
ament_target_dependencies(helloWorld)

install(TARGETS
  helloWorld
  DESTINATION lib/${PROJECT_NAME})

should do the trick for your simple example