0

I have not much clue how c and c++ works at compile and runtime!

We are trying to use Eclipse Paho C++ library as a dependency in the project and messed up right now.

We have reffered to https://github.com/eclipse/paho.mqtt.cpp/tree/master/src/samples and used the same code in our project but we get this error.

error: 'mqtt' has not been declared class callback : public virtual mqtt::callback

We also have the following in place

  1. Copied all the C and C++ libs(libmqttpp.so libpaho-mqtt3a.so.1.0 libpaho-mqtt3c.so.1 libmqttpp.so.0 libpaho-mqtt3as.so libpaho-mqtt3c.so.1.0 libmqttpp.so.0.1 libpaho-mqtt3as.so.1 libpaho-mqtt3cs.solibpaho-mqtt3a.so libpaho-mqtt3as.so.1.0 libpaho-mqtt3cs.so.1 libpaho-mqtt3a.so.1 libpaho-mqtt3c.so libpaho-mqtt3cs.so.1.0) to /usr/local/lib
  2. Copied .h files(MQTTAsync.h MQTTClient.h MQTTClientPersistence.h) to /usr/local/include

Apart from above 2 steps, do I need to add anything to my project to resolve the problem or I am missing anything.

Jayasagar
  • 2,046
  • 19
  • 22

1 Answers1

0

Finally, It worked after doing the following steps

  1. Download 'C' zip from http://build.eclipse.org/technology/paho/
  2. Copy lib files to /usr/lib/
  3. Modified SConscript(alljoyn/gateway/gwagent/GatewatConnector/samples/) to extend LIBS - gwcnc_env.Prepend(LIBS = ['paho-mqtt3a', 'paho-mqtt3c', 'alljoyn_about', 'alljoyn_services_common', 'alljoyn_notification', 'alljoyn_config', 'alljoyn_gwconnector'])
Jayasagar
  • 2,046
  • 19
  • 22