CyclingPusher icon indicating copy to clipboard operation
CyclingPusher copied to clipboard

ISO C++ forbids declaration of 'LiquidCrystal' with no type

Open veeectorm opened this issue 10 years ago • 8 comments

Sorry for my noobishness!

Im getting that erro while trying to compile this on Ardunio 1.0.5.

Any help would be greatly appreciated!

By the way, thank you for creating this...its a great idea!

EDIT: Added error from IDE on next post.

veeectorm avatar May 31 '14 17:05 veeectorm

changing:

#include "LiquidCrystal.h"

to:

#include <LiquidCrystal.h>

fixed the No such file or directory. I still get:

In file included from lcdwrapper.cpp:3: lcdwrapper.h:20: error: ISO C++ forbids declaration of 'LiquidCrystal' with no type lcdwrapper.h:20: error: expected ';' before '*' token lcdwrapper.cpp: In member function 'void LcdWrapper::begin()': lcdwrapper.cpp:19: error: 'lcdlib' was not declared in this scope lcdwrapper.cpp:19: error: expected type-specifier before 'LiquidCrystal' lcdwrapper.cpp:19: error: expected `;' before 'LiquidCrystal' lcdwrapper.cpp: In member function 'void LcdWrapper::clear()': lcdwrapper.cpp:25: error: 'lcdlib' was not declared in this scope lcdwrapper.cpp: In member function 'void LcdWrapper::setFirstLine(String)': lcdwrapper.cpp:31: error: 'lcdlib' was not declared in this scope lcdwrapper.cpp: In member function 'void LcdWrapper::message(String, int, bool)': lcdwrapper.cpp:40: error: 'lcdlib' was not declared in this scope lcdwrapper.cpp: In member function 'void LcdWrapper::setSecondLine(String)': lcdwrapper.cpp:60: error: 'lcdlib' was not declared in this scope lcdwrapper.cpp:63: error: 'lcdlib' was not declared in this scope

veeectorm avatar May 31 '14 17:05 veeectorm

Ok, after revising the code, i was able to compile...I run into another problem. Sketch is too big for an Arduino UNO. I removed the beep portions of the code, and now it fits, BUT i cant flash it...for some reason, it started coming up with a STK500 error, programmer is out of sync. Any help would be appreciated! :D

veeectorm avatar May 31 '14 23:05 veeectorm

Hi,

I haven't tried compiling it with 1.0.5 yet, I need to use 1.0.4 for some custom boards but I can confirm that it compiles and fits with 1.0.4:

avrdude: reading input file ".build/uno/firmware.hex"
avrdude: writing flash (32154 bytes):

Writing | ################################################## | 100% 5.27s

avrdude: 32154 bytes of flash written
avrdude: verifying flash memory against .build/uno/firmware.hex:
avrdude: load data flash data from input file .build/uno/firmware.hex:
avrdude: input file .build/uno/firmware.hex contains 32154 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.12s

avrdude: verifying ...
avrdude: 32154 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

It's entirely possible that some library changes in 1.0.5 pushes that over the limit. I'm already barely fitting in.

As for your STK500 error, they are generally not code related. It's probably an issue with your Arduino IDE configuration or a serial port issue. Good luck with that, it can get annoying to troubleshoot.

reefab avatar Jun 01 '14 00:06 reefab

Its a bit strange...im trying on my PC, a VM, and my Macbook, and all of them come up with the stk500 error. It might be the arduino itself, but other sketches flash just fine. Im downloading 1.0.4 to give that a shot. Thanks for the help reefab!

veeectorm avatar Jun 01 '14 00:06 veeectorm

I tried with 1.0.4. Downloaded the latest code, and its not compiling.. The code i revised with the help of a friend does compile, but crashes avr dude says error.... Really really weird. Maybe I'm missing something?

On May 31, 2014, at 9:08 PM, Fabien Piuzzi [email protected] wrote:

Hi,

I haven't tried compiling it with 1.0.5 yet, I need to use 1.0.4 for some custom boards but I can confirm that it compiles and fits with 1.0.4:

avrdude: reading input file ".build/uno/firmware.hex" avrdude: writing flash (32154 bytes):

Writing | ################################################## | 100% 5.27s

avrdude: 32154 bytes of flash written avrdude: verifying flash memory against .build/uno/firmware.hex: avrdude: load data flash data from input file .build/uno/firmware.hex: avrdude: input file .build/uno/firmware.hex contains 32154 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 4.12s

avrdude: verifying ... avrdude: 32154 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done. Thank you. It's entirely possible that some library changes in 1.0.5 pushes that over the limit. I'm already barely fitting in.

As for your STK500 error, they are generally not code related. It's probably an issue with your Arduino IDE configuration or a serial port issue. Good luck with that, it can get annoying to troubleshoot.

— Reply to this email directly or view it on GitHub.

veeectorm avatar Jun 01 '14 00:06 veeectorm

Hi, did you manage to fix your issue? I'm still stumped on what could be going on.

reefab avatar Jun 06 '14 01:06 reefab

Not really. Im waiting to get another UNO to see if that could be the problem. Between the code errors, and the sketch not compiling, ive sort of given up for some time.

Really strange things I bumped into hehee.

veeectorm avatar Jun 06 '14 01:06 veeectorm

Hey reefab.

Just got my new UNO in the mail...that took a while.

I lost the modified code, so im back to no compile. re-installed the IDE, same error as i pasted on post #2.

Im using 1.0.5 just in case....same thing with 1.0.4

Thought i keep you posted.

V.

veeectorm avatar Aug 18 '14 21:08 veeectorm