I got the example code from here.
I have the header file MQTTClient.h
as well.
However when I build I get the errors:
undefined reference to MQTTClient_create
undefined reference to MQTTClient_connect
undefined reference to MQTTClient_publishMessage
undefined reference to MQTTClient_waitForCompletion
undefined reference to MQTTClient_disconnect
In the header file these are set up as follows:
DLLExport int MQTTClient_create(MQTTClient* handle, const char* serverURI,
const char* clientId, int persistence_type, void* persistence_context);
I am using a Windows 8 machine with Eclipse C/C++ IDE
I also have some paho-mqtt.dll's I'm not sure how to get the example code up and running.
Thank you
It means paho library is not linked. In Linux for a
c
program example you can link paho library by this way:In my case it looks like: