Trouble loading any code related to LCD

I have a Sain Smart LCD Keypad shield with screen and no mater what sketch I try to load I get the fallowing error: :confused:

In file included from sketch_dec30d.ino:35: C:\Users\Sean\Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.h:86: error: conflicting return type specified for 'virtual void LiquidCrystal::write(uint8_t)' C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

Hi Sean.

Looks like your IDE has troubles with the library you are trying to use.

What IDE are you using, sometimes the newest IDE isn't the best choice. Did you install the library in the correct way (how did you install it ?) ? Which library are you using ? There's multiple LCD libs with the same name, so point to the source.

That may be the problem. I do not remember the last time I installed a lib. So I may not even have the one. I was looking to find one but did not have any luck. At one time I new how to install new Lib. but it seems to have left me.

Hi.

You do have some library installed, because you've got an error message pointing to its contents (which is different from some message that tells you there is no library at all). Which IDE are you using ? Newer IDEs will assist you in installing (but don't expect too much from that). You can find some more information on libraries right here (click !). And probably some LCD lib was pre-installed with your IDE, but you might need to update it anyway.

I was thinking that it had the Lib. installed. The basic program comes with a few LCD as examples. But they all give the same error. I believe the IDE is 1.0.5-r2 I had upgraded it some time back, but my sketch's for my full size R2D2 all started erroring out. So I went back to the previous ver. I wonder if that had anything to do with it. All my other sketch's work just fine.

Thanks for your help.

At some point you have installed or updated a “LiquidCrystal” library in your sketchbook/libraries area.
1.x Print class returns a status for write() while pre 1.x was a void.
One (IDE or library) is pre 1.x and one is post 1.0 and the two are incompatible.
You can see the issue in the error messages.

When the Arduino team went from the 1.0 release candidate to the official release (without ever doing another beta or even test release) they slipped in some changes that broke 100% of all 3rd party libraries.
This was a disaster and we are still seeing issues related to this 5 years later.

At this point you are in a situation where some of the code is pre 1.x and some is post 1.0
My recommendation is to go ahead and bite the bullet now and get all your code up to 1.x you will be way better off in the long run.
It sounds scary but it isn’t that bad.
You may have a few older pre 1.x libraries laying around that you are using but there are likely updated versions for 1.x (that may even support both pre 1.x and 1.x) and if not, the changes to make them work on 1.x IDEs are very minor and we can walk you through them.

My recommendations:

  1. remove the LiquidCrystal library in your sketchbook/libraries directory.
    You will have to do this manually as the Arduino team won’t provide a way to do it from the IDE GUI.
    All versions of the IDE come with a LiquidCrystal library that works with Arduino pins.
    If for some reason you really do need another LiquidCrystal library (like maybe you need/want backlight control), there are other LCD libraries that you can install.
    And we (or at least I) can help you through that issue as well.

  2. install a newer IDE
    1.0.5 is REALLY old and many updates, bug fixes, and great new capabilities and features have been added in the just about 3 years since 1.0.5-r2 came out.
    Lots of bugs, library APIs, and GUI features have been worked out in the mean time.
    I would suggest that you jump right to the latest IDE (1.8.0) or at least an IDE that 1.6.10 or newer.
    In this case the latest IDE will be much better than the 1.0.05-r2 IDE you have.

The newer 1.6x IDEs are just so much better than the older 1.0x IDEs and have a library manager that allow you to install or update 3rd party libraries straight from the GUI.

— bill