Ex 3.5 Compile Error

/home/user/catkin_ws/src/unit_35a/src/bb8_move_custom_service_client.cpp:1:58: fatal error: my_custom_srv_msg_pkg/MyCustomServiceMessage.h: No such file or directory
compilation terminated.

I think this error is related to the below line.
#include “my_custom_srv_msg_pkg/MyCustomServiceMessage.h”

Any idea ?

Hi @fig411,

This indicates that your CMakeLists.txt file has not been properly setup to recognize the message. Could you please review the notes and carefully make the required changes to your CMakeLists.txt and package.xml?

PS: it’s better to create your package from scratch (adding necessary dependencies at package creation) and then do the needed changes to those files. Copying solutions or examples verbatim usually will not work out of the box and might introduce some bugs.

Thanks ! It worked. I just added one line to CMakeLists.txt

1 Like