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

share compiled msg

asked 2023-01-03 01:59:52 -0500

fury.nerd gravatar image

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

edit retag flag offensive close merge delete

Comments

the main project compile errors are something like undefined reference torosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<test_msgs...`< p="">

fury.nerd gravatar image fury.nerd  ( 2023-01-03 02:04:33 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-02-14 20:27:05 -0500

fury.nerd gravatar image

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})

...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-01-03 01:59:52 -0500

Seen: 209 times

Last updated: Feb 14 '23