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
- MQTTClient-C V5 is currently disabled / not ready. https://github.com/eclipse/paho.mqtt.embedded-c/blob/mqttv5/MQTTClient-C/src/CMakeLists.txt#L29 You shouldn't expect V5 to build or work at this time. V3 does work and build but you should use the released one instead.
- MQTTClient-CPP - no V5 available today.
- MQTTPacket / V5 builds and works.
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