sticilface / Melvanimate

Melvanimate
60 stars 7 forks source link

Unable to compile #25

Closed jpfy closed 8 years ago

jpfy commented 8 years ago

I am having problems with compiling The error I am getting is /Users/phil/Documents/Arduino/libraries/Melvanimate/src/MelvanimateMQTT.cpp: In constructor 'MelvanimateMQTT::MelvanimateMQTT(Melvanimate*, IPAddress, uint16_t)': /Users/phil/Documents/Arduino/libraries/Melvanimate/src/MelvanimateMQTT.cpp:35:107: error: no matching function for call to ' AsyncMqttClient::onMessage(std::_Bind_helper<false, void (MelvanimateMQTT::*)(char*, char*, unsigned char, unsigned int, unsigned int, unsigned int), MelvanimateMQTT* const, const std::_Placeholder<1>&, const std::_Placeholder<2>&, const std::_Placeholder<3>&, const std::_Placeholder<4>&, const std::_Placeholder<5>&, const std::_Placeholder<6>&>::type)' _mqttClient.onMessage(std::bind (&MelvanimateMQTT::_onMqttMessage, this, _1, _2, _3, _4, _5, _6) ); ^ /Users/phil/Documents/Arduino/libraries/Melvanimate/src/MelvanimateMQTT.cpp:35:107: note: candidate is: In file included from /Users/phil/Documents/Arduino/libraries/async-mqtt-client/src/AsyncMqttClient.h:4:0, from /Users/phil/Documents/Arduino/libraries/Melvanimate/src/MelvanimateMQTT.h:5, from /Users/phil/Documents/Arduino/libraries/Melvanimate/src/MelvanimateMQTT.cpp:4: /Users/phil/Documents/Arduino/libraries/async-mqtt-client/src/AsyncMqttClient.hpp:45:20: note: AsyncMqttClient& AsyncMqttClient::onMessage(AsyncMqttClientInternals::OnMessageUserCallback) AsyncMqttClient& onMessage(AsyncMqttClientInternals::OnMessageUserCallback callback); ^ /Users/phil/Documents/Arduino/libraries/async-mqtt-client/src/AsyncMqttClient.hpp:45:20: note: no known conversion for argument 1 from 'std::_Bind_helper<false, void (MelvanimateMQTT::*)(char*, char*, unsigned char, unsigned int, unsigned int, unsigned int), MelvanimateMQTT* const, const std::_Placeholder<1>&, const std::_Placeholder<2>&, const std::_Placeholder<3>&, const std::_Placeholder<4>&, const std::_Placeholder<5>&, const std::_Placeholder<6>&>::type {aka std::_Bind<std::_Mem_fn<void (MelvanimateMQTT::*)(char*, char*, unsigned char, unsigned int, unsigned int, unsigned int)>(MelvanimateMQTT*, std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>, std::_Placeholder<4>, std::_Placeholder<5>, std::_Placeholder<6>)>}' to 'AsyncMqttClientInternals::OnMessageUserCallback {aka std::function<void(char*, char*, AsyncMqttClientMessageProperties, unsigned int, unsigned int, unsigned int)>}' exit status 1 Any ideas?

jpfy commented 8 years ago

Solved by using the specific version of the libraries mentioned in a previous post. Particularly the ArduinoJson version: 409ca7e and async-matt-client: d00420b