I have been am using Flash.h library from (http://arduiniana.org/libraries/flash/) Version 5 with Arduino 1.0.5 and teensy 3.1 without any issues. I had to upgrade to version 1.0.6 and now I am getting this error
[removed path from message]
/.../libraries/Flash/Flash.h: In member function 'char* _FLASH_STRING::copy(char*, size_t, size_t) const':
/.../libraries/Flash/Flash.h:79:44: error: operands to ?: have different types 'int' and 'char*'
and this is the code in flash.h
char *copy(char *to, size_t size = -1, size_t offset = 0) const
{
return size == -1 ?
strcpy_P(to, _arr + offset) : strncpy_P(to, _arr + offset, size);
}
at first glance I can see that the operand is comparing strcpy and strncpy and both of them return char* so I am not sure why it thinks one is an int.
this page has reference about the two functions used http://tuxgraphics.org/common/src2/article12051/avr-libc-user-manual/manual/group__avr__pgmspace.html
Any help would be appreciated to figure out what is the problem. Library test works with vailla Arduino 1.0.6, but when I install the Teensyduino, Version 1.20 and try to compile for teensy 3.1 I get this error. If I compile it to Arduino Uno it works.
Thanks in advance
I found the answer for this on PJRC forum. I applied the code changes and it worked for me. reference url: http://forum.pjrc.com/threads/26156-Teensy-3-1-and-TinyWebServer-Library?highlight=flash.h
Changed from
to
Hope this helps someone who is using flash.h library