Skip to content

compile error unter platform.io with Arduino framework #39

@ST-Oldie

Description

@ST-Oldie

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions