Thanks Ian,
That was a perfect shot. MQTT C Samples are working, While i tried with C++, there were few problems. I meant i couldn't compile cpp samples.
satish@zombie:~/works/mqtt/org.eclipse.paho.mqtt.cpp/src/samples$ make
g++ -I.. -I/home/satish/works/mqtt/org.eclipse.paho.mqtt.c/src -D_NDEBUG -Wall -std=c++0x -O2 -o async_publish async_publish.cpp -L../lib -L/home/satish/works/mqtt/org.eclipse.paho.mqtt.c/src/linux_ia64 -lmqttpp -lmqttv3a
/usr/bin/ld: cannot find -lmqttpp
/usr/bin/ld: cannot find -lmqttv3a
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'async_publish' failed
make: *** [async_publish] Error 1
I couldn't find mqttpp or linux_ia64 folder in my machine. What would be the compile command for C++ samples?
When i tried to compile without trying to make in samples directory, i get a lot of undefined reference errors!
satish@zombie:~/works/mqtt/org.eclipse.paho.mqtt.cpp$ gcc src/samples/sync_publish.cpp -lpaho-mqtt3c -I src -lpthread -std=c++11
/tmp/ccJXm2X5.o: In function `main':
sync_publish.cpp:(.text+0x174): undefined reference to `mqtt::client::client(std::string const&, std::string const&, mqtt::iclient_persistence*)
Thanks!