ROS2 symlinks and SHARED libraries
I have a class named move_bb8 that I am using as SHARED library. I am linking it with my node move_bb8_node. If I build it without --symlink-install, I do not get any compilation error, but my node gives an error saying that it can not find the library move_bb8.so.
Here is my CMakeLists.txt
# Define our move_bb8 class as library target
add_library(move_bb8 SHARED
src/move_bb8.cpp
)
ament_target_dependencies(move_bb8 rclcpp std_msgs geometry_msgs)
ament_export_libraries(move_bb8)
# Create an executable target for move_bb8_node and link it with our library move_bb8
add_executable(move_bb8_node src/move_bb8_node.cpp)
ament_target_dependencies(move_bb8_node rclcpp std_msgs geometry_msgs)
target_link_libraries(move_bb8_node move_bb8)
Can someone explain me the relationship between SHARED libraries and --symlink-install. I read the colcon documentation for --symlink-install, but it is still not clear to me.
Thank you!