Page 1 of 1

Domoticz compile error

Posted: Thursday 05 January 2017 17:48
by gennapium
Hi, After the make connand i get this error :

/home/domoticz/domoticz/hardware/XiaomiGateway.cpp: In member function âvoid XiaomiGateway::xiaomi_udp_server::handle_receive(const boost::system::error_code&, std::size_t)â:
/home/domoticz/domoticz/hardware/XiaomiGateway.cpp:447:27: error: ambiguous overload for âoperator[]â (operand types are âJson::Valueâ and âsize_t {aka long unsigned int}â)
message.append(root2.asString().c_str());
^
In file included from /home/domoticz/domoticz/hardware/../json/json.h:10:0,
from /home/domoticz/domoticz/hardware/XiaomiGateway.cpp:10:
/home/domoticz/domoticz/hardware/../json/value.h:408:10: note: candidate: Json::Value& Json::Value::operator[](Json::Value::ArrayIndex)
Value& operator[](ArrayIndex index);
^
/home/domoticz/domoticz/hardware/../json/value.h:416:10: note: candidate: Json::Value& Json::Value::operator[](int)
Value& operator[](int index);
^
/home/domoticz/domoticz/hardware/../json/value.h:421:16: note: candidate: const Json::Value& Json::Value::operator[](Json::Value::ArrayIndex) const
const Value& operator[](ArrayIndex index) const;
^
/home/domoticz/domoticz/hardware/../json/value.h:426:16: note: candidate: const Json::Value& Json::Value::operator[](int) const
const Value& operator[](int index) const;
^
CMakeFiles/domoticz.dir/build.make:3326: recipe for target 'CMakeFiles/domoticz.dir/hardware/XiaomiGateway.cpp.o' failed
make[2]: *** [CMakeFiles/domoticz.dir/hardware/XiaomiGateway.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:103: recipe for target 'CMakeFiles/domoticz.dir/all' failed
make[1]: *** [CMakeFiles/domoticz.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2


Anyone knows how to solve this ?

Re: Domoticz compile error

Posted: Thursday 05 January 2017 18:01
by gennapium
Problem solved,


Thanks Gizmocuz !!

Re: Domoticz compile error

Posted: Wednesday 29 August 2018 13:44
by karlzre
Hi,

How did you solve it ?