Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shiroto1214 opened this issue Apr 10, 2020 · 1 comment
Labels
Component: Core Related to the code for the standard Arduino API Type: Bug

Comments

@shiroto1214
Copy link

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.

@per1234 per1234 added the Type: Invalid Off topic for this repository, or a bug report determined to not actually represent a bug label Apr 10, 2020
facchinm added a commit to arduino/ArduinoCore-API that referenced this issue Apr 10, 2020
@per1234 per1234 added Component: Core Related to the code for the standard Arduino API Type: Bug and removed Type: Invalid Off topic for this repository, or a bug report determined to not actually represent a bug labels Apr 23, 2020
@CombiesGit
Copy link

CombiesGit commented Oct 21, 2020

Add line
#include <Arduino.h>
in File LiquidCrystal.h

@per1234 per1234 changed the title arduino megaAVR Boards Ver1.8.6 -- Report a bug. 'Print' has not been declared error when compiling LiquidCrystal library for Arduino megaAVR Boards Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Related to the code for the standard Arduino API Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants