Skip to content

'Print' has not been declared error when compiling LiquidCrystal library for Arduino megaAVR Boards #10025

Closed
@shiroto1214

Description

@shiroto1214

arduino megaAVR Boards -- Report a bug.
by Arduino Version 1.8.6
for Arduino Uno WiFi Rev2, Arduino Nano Every.

Since these two types of boards only occur in Ver1.8.6, please report bugs and take countermeasures.

The content of the bug.
I want to control a character type LCD using LiquidCriystal.h, but with this board manager version, the following error occurs and compilation cannot be verified.
Also occurs in the Hello World for LCD, which comes with arduinoIDE.

Ver1.8.5 Nano Every selected == normal.
Using the library LiquidCrystal version 1.0.7 in the following folder:
D:\ Arduino1812\Arduino\libraries\LiquidCrystal
"D:\shiroto1214\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "C:\Users\SHIROT~1\AppData\Local\Temp\arduino_build_203132/HelloWorld.ino.elf"
Of the maximum 49152 bytes of flash memory, sketches use 2162 bytes (4%).
Of the maximum 6144 bytes of RAM, global variables use 46 bytes (0%) and local variables can use 6098 bytes.

Ver1.8.6 Nano Every selected == Abnormal.
"D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.cpp" -o "C:\Users\SHIROT~1\AppData\Local\Temp\arduino_build_203132\libraries\LiquidCrystal\LiquidCrystal.cpp.o"
In file included from D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.cpp:1:0:

D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.h:45:36: error: expected class-name before '{' token
class LiquidCrystal : public Print {
^

D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.h:86:9: error: 'Print' has not been declared
using Print::write;
^~~~~

Using library LiquidCrystal version 1.0.7 in the following folder:
D:\ Arduino1812\Arduino\libraries\LiquidCrystal
exit status 1
An error occurred when compiling for board Arduino Nano Every.

Ver1.8.5 Uno WiFi Rev2 selected --normal.
"D:\shiroto1214\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "C:\Users\SHIROT~1\AppData\Local\Temp\arduino_build_203132/HelloWorld.ino.elf"
Of the up to 48640 bytes of flash memory, sketches use 2236 bytes (4%).
Of the maximum 6144 bytes of RAM, global variables use 46 bytes (0%) and local variables can use 6098 bytes.

Ver1.8.6 Uno WiFi Rev2 selected == Abnormal.
"D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.cpp" -o "C:\Users\SHIROT~1\AppData\Local\Temp\arduino_build_203132\libraries\LiquidCrystal\LiquidCrystal.cpp.o"
In file included from D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.cpp:1:0:

D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.h:45:36: error: expected class-name before '{' token
class LiquidCrystal : public Print {
^

D:\Arduino1812\Arduino\libraries\LiquidCrystal\src\LiquidCrystal.h:86:9: error: 'Print' has not been declared
using Print::write;
^~~~~

Using library LiquidCrystal version 1.0.7 in the following folder:
D:\Arduino1812\Arduino\libraries\LiquidCrystal
exit status 1
An error occurred when compiling for board Arduino Uno WiFi Rev2.

End Text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino APIType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions