odelot / aws-mqtt-websockets

Implementation of a middleware to use AWS MQTT service through websockets, aiming the ESP8266 plataform
GNU Lesser General Public License v3.0
231 stars 67 forks source link

Unable to compile #66

Closed TryingDev06 closed 2 years ago

TryingDev06 commented 2 years ago

I get the following errors when I try to compile the code. I have installed all of the dependencies. I'm not sure what's going wrong.

/Users/username/Documents/Arduino/libraries/aws-mqtt-websockets-master/AWSWebSocketClient.cpp: In member function 'char* AWSWebSocketClient::generateAWSPath(uint16_t)': /Users/username/Documents/Arduino/libraries/aws-mqtt-websockets-master/AWSWebSocketClient.cpp:210:16: error: no match for 'operator+=' (operand types are 'String' and 'char [(<anonymous> + 1)]') 210 | key_credential+=credentialScope; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /Users/username/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/Arduino.h:286, from /Users/username/Documents/Arduino/libraries/aws-mqtt-websockets-master/AWSWebSocketClient.h:4, from /Users/username/Documents/Arduino/libraries/aws-mqtt-websockets-master/AWSWebSocketClient.cpp:1: /Users/username/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/WString.h:133:17: note: candidate: 'template<class T> String& String::operator+=(const T&)' 133 | String &operator +=(const T &rhs) { | ^~~~~~~~ /Users/username/Library/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/cores/esp8266/WString.h:133:17: note: template argument deduction/substitution failed: /Users/username/Documents/Arduino/libraries/aws-mqtt-websockets-master/AWSWebSocketClient.cpp:210:18: note: variable-sized array type 'char [(<anonymous> + 1)]' is not a valid template argument 210 | key_credential+=credentialScope; | ^~~~~~~~~~~~~~~ exit status 1

Any help or advice would be appreciated!

odelot commented 2 years ago

Hi, the lib was tested with esp/Arduino SDK version 2.7.3 and you are using 3.0.2. maybe this is the reason.

ncastrinos commented 2 years ago

Downgrading in the board manager to 2.7.3 removed this error for me.