# [SOLVED] Help with linker error

Hello,

I am getting a linker error while trying to compile a package for Part II of the course project.

``````undefined reference to `rosidl_message_type_support_t const* rosidl_typesupport_cpp::get_message_type_support_handle<sensor_msgs::msg::LaserScan_<std::allocator<void> > >()
``````

I have received this error before and it was because I had not included the message packages. So I double checked that I have the sensor_msgs package in both package.xml and CMakeLists.txt. However, I still get the error. Am I misunderstanding the meaning of this error?

-Erin

No I didn’t.

I had forgotten to add sensor_msgs to the ament_target_dependencies in CMakeLists.txt. At least I remembered to find the package.

2 Likes

Hi @ikonone,

I am glad that you could solve it.
Also thanks for posting the solution so that other students can learn from it.

Regards;

Roberto