IniFile icon indicating copy to clipboard operation
IniFile copied to clipboard

compile error unter platform.io with Arduino framework

Open ST-Oldie opened this issue 9 months ago • 2 comments

I add this library to a project under platform.io with Arduino framework and got a error while compiling this lib:

In file included from /home/michael/.platformio/packages/framework-arduinoespressif8266/libraries/SD/src/SD.h:24,
                 from .pio/libdeps/esp12e/IniFile/src/IniFile.h:10,
                 from .pio/libdeps/esp12e/IniFile/src/IniFile.cpp:1:
/home/michael/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/FS.h:70:23: note:   initializing argument 1 of 'virtual int fs::File::read(uint8_t*, size_t)'
   70 |     int read(uint8_t* buf, size_t size) override;

I think, the problem can be fixed by change fs::File::read() to fs::File::readBytes() which has a "char *" as first parameter and calls read() with a typecast to "unit8:t *" A typecast should also work.

ST-Oldie avatar Mar 30 '25 08:03 ST-Oldie