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

Solved. When using Mosquitto, I had to link the client library in my CMakeList. Basically the libmosquitto.so file, which is the client library. I did not gvdhoorn suggested, but what he suggested was similar to what I did, he pointed out that I was missing the Mosquitto Client Library.

I added the following to my cmake list:

set(Mosquitto_libs
  /usr/lib/x86_64-linux-gnu/libmosquitto.so
  /usr/lib/x86_64-linux-gnu/libmosquitto.so.1
)
target_link_libraries(mqtt_pub_node ${catkin_LIBRARIES} ${Mosquitto_libs})