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

Many thanks Ian for the earliest reply.

Just to confirm are you mentioning this make file http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.c.git/tree/Makefile ?
If not please point me to it.




On Mon, Apr 7, 2014 at 9:41 PM, Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
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.

Ian


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

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 

--
cheerz,
Rajath


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev

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


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev




--
cheerz,
Rajath

Back to the top