Compiling C++ Paho MQTT code gives error "Could not find Paho MQTT C library"

1.7k Views Asked by At

I'm using Ubuntu 16.04, I cloned the c library at ~/Paho_MQTT/paho_c and ran following commands in paho.mqtt.c folder,

sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui
sudo apt-get install fakeroot fakeroot devscripts dh-make lsb-release
sudo apt-get install libssl-dev
sudo apt-get install doxygen graphviz
mkdir build
cd build
ccmake ..
make
sudo make install

All goes well.

Then I cloned c++ code at ~/Paho_MQTT/paho_cpp, and ran following commands in the paho.mqtt.cpp folder,

mkdir build
cd build
cmake -DPAHO_MQTT_C_PATH=~/Paho_MQTT/paho_c/paho.mqtt.c ..

Here I get error, "Could not find Paho MQTT C library", Can you please suggest any solution ?

0

There are 0 best solutions below