ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You're including the right headers, but you also need to tell the compiler to link against the bluetooth library.
In CMake, you can link against libraries with the target_link_libraries command:
target_link_libraries(my_target bluetooth)
(you'll need to replace my_target
with the name of your target)
This is the equivalent of passing -lbluetooth
to the compiler when building with gcc manually.