eclipse / paho.mqtt.embedded-c

Paho MQTT C client library for embedded systems. Paho is an Eclipse IoT project (https://iot.eclipse.org/)

Home Page:https://eclipse.org/paho

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error when compiling MQTTV5

bertthomas opened this issue · comments

When working on the MQTTV5 branch:'

when compiling MQTTClient-C/MQTTClient.c the compiler complains about an error on line 466: MQTTPacket_connectData does not contain a member named cleanstart. The compiler is right: there is no member with that name in that structure.

MQTTClient does have a member named cleanstart, perhaps it should be taken from there?

Very likely you are not following our build system: https://github.com/eclipse/paho.mqtt.embedded-c/tree/mqttv5?tab=readme-ov-file#build-requirements--compilation
I've just gave build a try and it builds w/o any errors:

mkdir build
cd build
cmake -G Ninja ..
ninja

The MQTTv5 branch is an active development branch (things will change and compat will not be preserved until released). You'll need to dig through CMake files to understand what extra compile options must be passed.
E.g. setting MQTTV5 MQTT_CLIENT or MQTT_SERVER. See https://github.com/eclipse/paho.mqtt.embedded-c/blob/mqttv5/MQTTPacket/src/CMakeLists.txt