share compiled msg
hi, i have write a interface/msg test_msgs
pkg in ros2 galactic, and succesful compiled in cpp env;
i wish to share the compiled headers to another project to make a integrated compile, i remember in foxy i just copy the /instal/test_msgs/include
to the main project and then include these headers properly, but in galactic looks like the method does not work.
did i missing something or is there a example i can follow?
thanks
Asked by fury.nerd on 2023-01-03 02:59:52 UTC
Answers
to anyone who seek similiar use-case (and myself memo):
include header files in include
, and target link lib/*.so
when compile, following cmake for reference:
...
include_directories(path/to/header-folder)
...
link_directories(path/to/so-folder)
...
target_link_libraries(app -l${msg_pkg_name})
...
Asked by fury.nerd on 2023-02-14 21:27:05 UTC
Comments
the main project compile errors are something like
undefined reference to
rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<test_msgs...`Asked by fury.nerd on 2023-01-03 03:04:33 UTC