Skip to content

'class Print' has no member named 'flush' #2

@randomhammer

Description

@randomhammer

I am trying to use the library on an ESP32 using PlatformIO and it does not compile. The error is:

src/PrintStream.cpp: In function 'Print& endl(Print&)':
src/PrintStream.cpp:23:11: error: 'class Print' has no member named 'flush'
   printer.flush();
           ^
src/PrintStream.cpp: In function 'Print& flush(Print&)':
src/PrintStream.cpp:48:11: error: 'class Print' has no member named 'flush'
   printer.flush();
           ^
*** [.pio/build/esp-wrover-kit/src/PrintStream.cpp.o] Error 1

It seems that the ESP32 Serial class has no flush method. Is there some easy fix for this that I can't seem to find on Google? I am using PlatformIO with the ESP32 board. Using this library with an Atmel board works just fine.

There is a second error message that shows up in the IDE's "Problems" window, but I don't see in the compiler output:

a value of type "enum <unnamed>" cannot be used to initialize an entity of type "enum <unnamed>"

Must be related, but I do not know how to diagnose. Any help would be appreciated.

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