Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] compiling guide for e.g. MQTTTet_v2.c in linux

Hi,

when you run the Paho make file, you will see the commands it uses to build the samples and test programs.  An example is this:

cc -o build/output/samples/subasync src/samples/subasync.c -lpaho-mqtt3c  -I src -lpthread -L build/output

The messages you are getting mean you are missing the linker options to link with the Paho client library (-lpaho-mqtt3c).

Ian

On 11/03/2015 09:34 AM, Achuthan Paramanathan wrote:

Hi,

 

Dose someone here, how have a simple guide, a ”howto” to create a makefile to compile one of the c files proided in the test folder ?

 

Currently I am getting some linker error:

 

main.c:(.text+0xb4): undefined reference to `MQTTClient_create'

main.c:(.text+0xd8): undefined reference to `MQTTClient_connect'

main.c:(.text+0x138): undefined reference to `MQTTClient_publishMessage'

main.c:(.text+0x170): undefined reference to `MQTTClient_waitForCompletion'

main.c:(.text+0x198): undefined reference to `MQTTClient_disconnect'

main.c:(.text+0x1a4): undefined reference to `MQTTClient_destroy'

 

I am not that sharp in writing makefile especially not linking obj and lib, any help/hint  is much appreciated

 

Thx in advance

Acp



_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


Back to the top