getting error while trying to install paho library for cpp

  c++, mqtt, paho

Im following these steps to install Paho MQTT library for cpp:

sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui git doxygen graphviz libssl-dev

git clone https://github.com/eclipse/paho.mqtt.c.git

cd paho.mqtt.c

git checkout v1.2.1    (tried v1.3.8 and v1.3.1)

cmake -Bbuild -H. -DPAHO_WITH_SSL=ON

sudo cmake --build build/ --target install

sudo ldconfig

cd ..

git clone https://github.com/eclipse/paho.mqtt.cpp

cd paho.mqtt.cpp

cmake -Bbuild -H. -DPAHO_BUILD_DOCUMENTATION=TRUE
-DPAHO_BUILD_SAMPLES=TRUE

sudo cmake --build build/ --target install

But when I execute the last step sudo cmake --build build/ --target install I get an error that you here below. I also cant find ‘sync_publish’ binary file in usr/local/bin. Only a file called MQTTVersion.

make[2]: *** [src/CMakeFiles/paho-cpp-objs.dir/build.make:63: src/CMakeFiles/paho-cpp-objs.dir/async_client.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:212: src/CMakeFiles/paho-cpp-objs.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

Anyone know what to do? or knows a similar (easier to install) mqtt service.

Source: Windows Questions C++

LEAVE A COMMENT