Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho MQTT for Android NDK

Hi Fernando,

I haven't personally used the C client within Android - this capability was in a contribution:

https://github.com/eclipse/paho.mqtt.c/pull/299

Perhaps you could try asking the author of the PR?

Ian


On 23/11/2017 18:38, Fernando . wrote:
Hello all,

After searching the internet a bit a found there is an Android version of Paho MQTT, but it's in Java and i was interested in using the C implementation with Android's NDK.
I already have an ongoing C project in Android Studio and wanted to integrate it with the Paho Mqtt C client.

I noticed there is an "android" folder at github but i'm not sure if i'm able to use that makefile with Android Studio:
https://github.com/eclipse/paho.mqtt.c/tree/master/android

This is fairly new to me, so i'm unsure if there are special steps needed to do this.
Initially my idea was to add the "add_library" command to the default/main "CMakeList.txt" with all the source files to be compiled as a shared object (including the headers also), but i got a "multiple definitions" error in "MQTTClient.c":
Error:(1314) multiple definition of `MQTTProtocol_closeSession'
Error:(84) multiple definition of `bstate'
Error:(80) multiple definition of `client_timestamp_eye'
Error:(80) multiple definition of `client_version_eye'



_______________________________________________
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