0

Cannot Compile Example Code
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Cannot Compile Example Code

by SirFICO on Sun Jan 06, 2019 6:47 pm

I tried to check compile 2 example sketches from the Adafruit IO Arduino library - adafruitio_15_temp_humidity and adafruitio_IO_dashboard_creation and for both I get the following error

Arduino/Sketch/libraries/ArduinoHttpClient/src/HttpClient.h:310:50: error: return-statement with a value, in function returning 'void' [-fpermissive]
virtual void flush() { return iClient->flush(); };
^
exit status 1
Error compiling for board Adafruit Feather HUZZAH ESP8266.

So to my limited abilities it appears to be something to do with the ArduinoHttpClient library. I tried to go back to an earlier version of this library but I get the same message. Do you have any suggestions or hints as to what to do to make the sketches compile OK.

SirFICO
 
Posts: 2
Joined: Sun Jan 06, 2019 6:10 pm

Re: Cannot Compile Example Code

by SirFICO on Sun Jan 06, 2019 8:36 pm

oh yehaa, I think I may have solved this myself - perhaps I'm learning something at last.

I looked on GitHub and saw an update of 4 days ago that was not in the Arduino Library so I downloaded and replace the files in the /library/xxx directory. This resulted in a whole bunch more of errors. I then saw the ESP8266 Community board in the boards manager said 'beta' so I went back to a previous version. And now I can test verify without error. I can now go to bed a happy chappie.

SirFICO
 
Posts: 2
Joined: Sun Jan 06, 2019 6:10 pm

Re: Cannot Compile Example Code

by brubell on Mon Jan 07, 2019 10:52 am

SirFICO wrote:oh yehaa, I think I may have solved this myself - perhaps I'm learning something at last.

I looked on GitHub and saw an update of 4 days ago that was not in the Arduino Library so I downloaded and replace the files in the /library/xxx directory. This resulted in a whole bunch more of errors. I then saw the ESP8266 Community board in the boards manager said 'beta' so I went back to a previous version. And now I can test verify without error. I can now go to bed a happy chappie.


You got it - there was an update to the ESP8266 BSP which forced a beta firmware onto the general release channel.

For others looking to downgrade, follow the guide here: https://learn.adafruit.com/adafruit-io- ... roject-7-1

brubell
 
Posts: 209
Joined: Fri Jul 17, 2015 10:33 pm

Re: Cannot Compile Example Code

by Lo on Sat Jan 12, 2019 5:56 pm

Great info !!
Very usefull, I was getting desperate....

Lo
 
Posts: 5
Joined: Fri Oct 26, 2018 11:32 am

Please be positive and constructive with your questions and comments.