yaml-cpp in ROS2 linking errors
Hi everybody,
Following problem occurred: I'm trying to use yaml-cpp in a ROS2 package and it returns loads of linking errors ("undefined reference to ...") I have linked yaml-cpp to the project in the CMakeLists.txt and it throws no errors what so ever, so I assumed everything went fine. Did something change with the yaml-cpp library for ROS2? Or do i have a mistake in my CMakeList?
Important parts of CMakeLists.txt:
find_package(yaml-cpp REQUIRED)
# include directories
include_directories(
include
include/multi_node_controller
include/multi_node_controller/auto_generated
${YAML_CPP_INCLUDEDIR}
)
add_executable(function_parser src/function_parser.cpp)
ament_target_dependencies(function_parser
rclcpp
std_msgs
custom_msgs
yaml-cpp)
Or do I need to include it in the package.xml?
Thanks for any help!