Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Problem compiling on raspberry pi

Hi Rajath,

the Makefile (in the root directory of the repository) creates samples and test programs, which will be built in exactly the same way as your application.   You could use these as an example.

The libraries with names ending in c or cs are the synchronous library, and the libraries with names ending with a or as are the asynchronous library.   You need to link with the asynchronous library (that is, libpaho-mqtt3a or libpaho-mqtt3as) to get find the MQTTAsync_create() call.  And the call is MQTTAsync_create, not MQTTAsync_Create.


On 04/07/2014 03:29 PM, rajath ramesh wrote:

I am trying to compile a sample program that uses Paho mqtt C client on raspberry pi.
gcc in raspberry is 4.6.. Whenever I compile the code I see below error

Undefined reference to "<func-name in mqtt library say MQTTAsync_Create>"

Things I tried and it didnot work
- use -L and -l options
- Export LIBRARY_PATH to the directory having .so files

Kindly request your help in compiling the code 


paho-dev mailing list

Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Committer on Paho, Mosquitto

Back to the top