ROS plugins vs. static linking
If running static linking in a ROS workspace by passing CMAKE_BUILD_SHARED_LIBS=ON
it will only create static libs (.a files).
However, this seems prevent plugins from working. When trying to load them I receive the error:
Failed to load nodelet [....] of type [.....]: Could not find library corresponding to plugin ..... Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
Should I add an explicit SHARED
to each add_library
if the respective library is eventually loaded by as a plugin in order to override the command line arg? Or are there other appropriate ways in this case?
"static libs" and "is plugin lib not capable of handling static libs" is a bit of a strange question: dynamic libraries are exactly what is required for any sort of dynamic loading of object code.
Ok, thank you, i guess adding an explicit shared to add libraries in Plugin pkgs is the Most senseful approach because creating static libs in these pkgs does Not make any sense then...