Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Compiling Paho C Client

Hi Andrew,
 
The source tarballs are on git
 
Please see the Download section of this page https://www.eclipse.org/paho/clients/c/ to follow the download link for the pre-built binaries for Windows, Linux and Mac
 
--
Regards,
Mike Tran
 
 
 
----- Original message -----
From: Andrew Kenny <andrew.kenny01@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Cc:
Subject: Re: [paho-dev] Compiling Paho C Client
Date: Thu, Oct 15, 2015 1:22 PM
 
Hi
 
Where is the paho-mqtt3c library? Not on git?
 
Regards
Andrew
 
On Thu, Oct 15, 2015 at 3:47 PM, Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

when you run the make file, it shows what commands are used to build the libraries and samples:

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

for pubsync.c for instance.  Your errors are caused by not linking to the Paho library.


Ian
 
On 10/15/2015 04:12 AM, Satish V Madala wrote:
Hi folks!
 
I have been using MQTT since many days and for the first time i have to use a C/C++ Client. Probably, there is a compiling problem with the present code at paho git (or i miss something):
 
 
git clone http://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.c.git
cd org.eclipse.paho.mqtt.c.git
make
make install
Make Install was succesful and I have tried the sample in src/samples directory.
 
gcc pubsync.c 
/tmp/ccbSD877.o: In function `main':
pubsync.c:(.text+0xf2): undefined reference to `MQTTClient_create'
pubsync.c:(.text+0x116): undefined reference to `MQTTClient_connect'
pubsync.c:(.text+0x191): undefined reference to `MQTTClient_publishMessage'
pubsync.c:(.text+0x1d1): undefined reference to `MQTTClient_waitForCompletion'
pubsync.c:(.text+0x202): undefined reference to `MQTTClient_disconnect'
pubsync.c:(.text+0x211): undefined reference to `MQTTClient_destroy'
collect2: error: ld returned 1 exit status
I got these errors. Any compilation document would be really helpful.
 
Am running 15.04 Ubuntu. Was running mosquitto_clients and python clients on the machine.
(Actually, I want C++ implementation, which would require this C Client installed. ) 
 
It seems like libraries aren't linked, but isn't it supposed to be linked by default when i make installed? 
 
Thanks!
With Regards,
 
Satish V Madala Techpreneur & FOSS Evangelist
 
 
 
_______________________________________________
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

 

_______________________________________________
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
_______________________________________________
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


Back to the top