How to link code with catkin?
I'm having trouble linking code with catkin have the following file structure:
mypackage/
|src/
| ros_node.cpp
|lib/
| library.c
|include/
| library.h
ros_node.cpp includes library.h and my CMakelist has the following for building:
add_library(library lib/library.c)
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(ros_node src/ros_node.cpp)
add_dependencies(ros_node ros_node_generate_messages_cpp)
target_link_libraries(ros_node ${catkin_LIBRARIES} library)
This fails when linking the library to the ROS node. Anyone able to point me in the right direction for properly linking with ROS?
Thanks
add a comment