Has anyone successfully compiled the Paho C client on OS X *and used it in an application*? It may be a problem between chair and keyboard and the weirdness of trying to make sense of Xcode… I think I have a static library built, but I'm having trouble building the samples (the ones buried in the doxygen docs… it would be nice to get those put into the repo in regular source form, btw).
For example I'm seeing (for the async sub client):
subclient.c:21:13: error: 'void' must be the first and only parameter if specified
int msgarrvd(void context, char *topicName, int topicLen, MQTTClient_message *message)
^
subclient.c:30:16: warning: incompatible pointer to integer conversion assigning to 'char' from 'void *';
payloadptr = message->payload;
^ ~~~~~~~~~~~~~~~~
subclient.c:33:17: error: indirection requires pointer operand ('int' invalid)
putchar(*payloadptr++);
^~~~~~~~~~~~~
subclient.c:59:53: warning: incompatible pointer types passing 'int (int, char *, int, MQTTClient_message *)' to parameter of type 'MQTTClient_messageArrived *' (aka 'int (*)(void *, char *, int, MQTTClient_message *)') [-Wincompatible-pointer-types]
MQTTClient_setCallbacks(client, NULL, connlost, msgarrvd, delivered);
^~~~~~~~
MQTTClient.h:305:47: note: passing argument to parameter 'ma' here