I am trying to build Paho C++ library but I am getting the
following errors after make command. Can someone please help
me resolve it?
/home/haider/paho.mqtt.cpp/src/disconnect_options.cpp:
In member function ‘mqtt::disconnect_options&
mqtt::disconnect_options::operator=(const
mqtt::disconnect_options&)’:
/home/haider/paho.mqtt.cpp/src/disconnect_options.cpp:36:8:
error: use of deleted function
‘MQTTAsync_disconnectOptions&
MQTTAsync_disconnectOptions::operator=(const
MQTTAsync_disconnectOptions&)’
opts_ = opt.opts_;
^
In file included from
/home/haider/paho.mqtt.cpp/src/mqtt/disconnect_options.h:26:0,
from
/home/haider/paho.mqtt.cpp/src/disconnect_options.cpp:3:
/home/haider/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/haider/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/haider/paho.mqtt.cpp/src/disconnect_options.cpp:
In member function ‘mqtt::disconnect_options&
mqtt::disconnect_options::operator=(mqtt::disconnect_options&&)’:
/home/haider/paho.mqtt.cpp/src/disconnect_options.cpp:43:8:
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
make[2]: *** Waiting
for unfinished jobs....
CMakeFiles/Makefile2:87:
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