I have compiled the C version of paho MQTT library and now I'm trying to compile the C++ version but get a compile error:
/home/pi/http://ift.tt/2tnEZXk: In member function ‘mqtt::disconnect_options& mqtt::disconnect_options::operator=(const mqtt::disconnect_options&)’:
/home/pi/http://ift.tt/2tX2wLR: error: use of deleted function ‘MQTTAsync_disconnectOptions& MQTTAsync_disconnectOptions::operator=(const MQTTAsync_disconnectOptions&)’ opts_ = opt.opts_; ^ In file included from /home/pi/http://ift.tt/2tnbkgN, from /home/pi/http://ift.tt/2tWWs5O: /home/pi/paho.mqtt.c/src/MQTTAsync.h:835:3: note: ‘MQTTAsync_disconnectOptions& MQTTAsync_disconnectOptions::operator=(const MQTTAsync_disconnectOptions&)’ is implicitly deleted because the default definition would be ill-formed: } MQTTAsync_disconnectOptions; ^ /home/pi/paho.mqtt.c/src/MQTTAsync.h:835:3: error: non-static const member ‘const char MQTTAsync_disconnectOptions::struct_id [4]’, can’t use default assignment operator /home/pi/http://ift.tt/2tnEZXk: In member function ‘mqtt::disconnect_options& mqtt::disconnect_options::operator=(mqtt::disconnect_options&&)’: /home/pi/http://ift.tt/2tnOYvz: error: use of deleted function ‘MQTTAsync_disconnectOptions& MQTTAsync_disconnectOptions::operator=(const MQTTAsync_disconnectOptions&)’ opts_ = opt.opts_; ^ src/CMakeFiles/common_obj.dir/build.make:110: recipe for target 'src/CMakeFiles/common_obj.dir/disconnect_options.cpp.o' failed make[2]: * [src/CMakeFiles/common_obj.dir/disconnect_options.cpp.o] Error 1 CMakeFiles/Makefile2:89: recipe for target 'src/CMakeFiles/common_obj.dir/all' failed make[1]: * [src/CMakeFiles/common_obj.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2
I use for both libraries the head branch from git and compiling under raspbian with the latest version of C++
Any idea?
Aucun commentaire:
Enregistrer un commentaire