0

I was trying to compile paho cpp client from source:

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

However, the code in file "connect_options.cpp" gives me compilation error, due to it is trying to access an nonexist member "binarypwd" in C struct "MQTTAsync_connectOptions".

Besides, it is trying to copy two "MQTTAsync_connectOptions" struct object by invoking "=" operator, however, this operator overload is not defined in that C struct (obviously cause it is C struct!)

This is weird, because it should be well maintained on github, do I miss something in here?

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
xmanreturn
  • 79
  • 1
  • 14

1 Answers1

0

I quickly tried compiling the libraries and its working with the latest files from github, here are the steps I followed.

Paho C

./configure
cd ../paho.mqtt.c
make
export PAHO_MQTT_C_PATH=$PWD
export LD_LIBRARY_PATH=$PWD/build/output

Paho cpp

cd ../paho.mqtt.cpp
export PAHO_DIR=$PWD
$PAHO_DIR/configure --with-paho-mqtt-c=$PAHO_MQTT_C_PATH
CXX=g++-4.8 CC=gcc-4.8 $PAHO_DIR/configure --with-paho-mqtt-c=$PAHO_MQTT_C_PATH
make

PS: One suggestion is to wipe out the whole PAHO cpp & C folder and clone the repo again to do these steps, cos I remember facing the same issue with "=" operator when I was switching between with and without SSL library but I ended up starting fresh to resolve the issue.

Randolf
  • 125
  • 1
  • 9
  • It is working with the latest files from develop branch, but not from master branch, as indicated at the top of README of paho.mqtt.cpp.. Thanks for your answer, it is also very important to me:) – xmanreturn Jun 20 '17 at 03:18