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

Revision history [back]

click to hide/show revision 1
initial version

See this example on creating a library and using it in the same package.

In particular, note that for packages that aren't coming from find_package, e.g. locally compiled libraries in the same package, you will need to use target_link_libraries. See this answer.

In additon, make sure the libraries and packages are installed in the correct location, or else the node will not be able to find the library

install(
  TARGETS my_lib
  DESTINATION lib
)

install(
  TARGETS node
  DESTINATION lib/${PROJECT_NAME}
)