-->
Page 1 of 1

Dependencies on <avr/pgmspace.h>

PostPosted: Sat Aug 13, 2016 8:09 am
by picstart
When importing code to the esp82666 this dependency on <avr/pgmspace.h> will cause compiler issues.
Is there a preferred way to override this?
It can be dug out but it is unpleasantly buried in the supporting xxx.h files plus it creates another branch of the code ( esp arduino code versus plain avr arduino code).
Any update in the supporting library means it has to be dug out for the esp library.

Re: Dependencies on <avr/pgmspace.h>

PostPosted: Sat Aug 13, 2016 9:42 am
by martinayotte
Try removing the "avr/" subfolder and simply use "#include <pgmspace.h>
That doesn't means the rest of library code will compile fine, it is depend which one you trying to port.

Re: Dependencies on <avr/pgmspace.h>

PostPosted: Wed Aug 17, 2016 8:52 am
by picstart
[quote]Try removing the "avr/" subfolder and simply use "#include <pgmspace.h>[/quote]
This is the best solution so far and I've been doing this...just wondering if there was a high level switch in the compilation at the board level esp8266 to substitute for the avr/ dependency.

Re: Dependencies on <avr/pgmspace.h>

PostPosted: Wed Aug 17, 2016 9:32 am
by martinayotte
Yes ! Many compatible libs already use the "#if defined(ESP8266)" flag.