Reputation: 150
I just spend some time trying to figure out how to use the Paho Mqtt library in a C++ Rosnode and write this in case anybody has the same problem.
Upvotes: 0
Views: 1193
Reputation: 150
Install the Paho library as described in the Github readme.
In the Cmakelists.txt of the Rosnode add:
find_package(PahoMqttCpp REQUIRED)
target_link_libraries(${PROJECT_NAME}
PahoMqttCpp::paho-mqttpp3
)
in the package.xml add:
<depend>PahoMqtt</depend>
That should be everything to use it in your C++ code.
Upvotes: 1