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

Revision history [back]

click to hide/show revision 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.