I have been using MQTT since many days and for the first time i have to use a C/C++ Client. Probably, there is a compiling problem with the present code at paho git (or i miss something):
make install
Make Install was succesful and I have tried the sample in src/samples directory.
gcc pubsync.c
/tmp/ccbSD877.o: In function `main':
pubsync.c:(.text+0xf2): undefined reference to `MQTTClient_create'
pubsync.c:(.text+0x116): undefined reference to `MQTTClient_connect'
pubsync.c:(.text+0x191): undefined reference to `MQTTClient_publishMessage'
pubsync.c:(.text+0x1d1): undefined reference to `MQTTClient_waitForCompletion'
pubsync.c:(.text+0x202): undefined reference to `MQTTClient_disconnect'
pubsync.c:(.text+0x211): undefined reference to `MQTTClient_destroy'
collect2: error: ld returned 1 exit status
I got these errors. Any compilation document would be really helpful.
Am running 15.04 Ubuntu. Was running mosquitto_clients and python clients on the machine.
(Actually, I want C++ implementation, which would require this C Client installed. )
It seems like libraries aren't linked, but isn't it supposed to be linked by default when i make installed?