ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS2 static compile

asked 2020-03-18 13:41:26 -0600

nstanleyiv gravatar image

Has anyone compiled their application to load all the libraries into the executable, so it wouldn't need the full ROS2 library loaded onto a system?

edit retag flag offensive close merge delete

Comments

Did the proposed answer by Dirk Thomas work for you?

psammut gravatar image psammut  ( 2022-05-12 18:53:43 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-03-19 22:27:40 -0600

Dirk Thomas gravatar image

All CMake packages which use / depend on ament_cmake_ros have the CMake option BUILD_SHARED_LIBS: see https://github.com/ros2/ament_cmake_r...

By setting it to OFF these packages will produce static libraries instead of shared libraries.

Note: Since that configuration is not being used frequently and not tested by any CI I would guess that you might encounter issues when trying to use it.
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-03-18 13:40:53 -0600

Seen: 1,292 times

Last updated: Mar 19 '20