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

I had the same issue trying to port a package from ROS1 to ROS2. After some research, I figured out following way helps to link the Boost libraries correctly.

find_package(Boost REQUIRED COMPONENTS 
  system 
  thread 
  program_options
)

target_link_libraries(myPackage
                      ${Boost_LIBRARIES})

ament_target_dependencies(myPackage 
                          rclcpp
                          geometry_msgs)