Trouble with LiquidCrystal440 Library

I’ve spent a long time troubleshooting this problem. I’ve done a lot of Google searches, searched this forum, tried multiple versions of the Arduino programming software, etc. I’m still stuck, so any help is appreciated.

I’m using a 20x2 LCD in a project and scrolling is a bit quirky using the regular LiquidCrystal library, so I downloaded the LiquidCrystal440 library and put it in the /libraries/ folder. I’ve done this with other libraries and used them without issue in programs, as expected.

However, when I compile my program with the #include<LiquidCrystal440.h> line, I get the following errors:

In file included from Gaussmeter_v1.cpp:1:
C:\Program Files (x86)\Arduino 1.0\arduino-1.0\libraries\Liquidcrystal440/LiquidCrystal440.h:92: error: conflicting return type specified for ‘virtual void LiquidCrystal::write(uint8_t)’
C:\Program Files (x86)\Arduino 1.0\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding ‘virtual size_t Print::write(uint8_t)’

My code works fine without calling the library, but returns these errors when I include it. I’ve tried multiple programs with the same result.

I hope this is enough information, but if I’m leaving anything out just let me know.

It seems like the LiquidCrystal class derives from the Print class. However, it seems like the Print class expects the write() method to return a size_t (probably number of bytes written), whereas the LiquidCrystal library write() method returns void.

My guess is that LiquidCrystal, the class, was developed for some earlier version of the Print class that said write() returns void. To make this work, you'll have to update LiquidCrystal, the class (both .h and .cpp) to make the write() function return a size_t. If you don't know how to do this, you'll have to contact whoever wrote the library and ask if they want to do it.

If you don’t know how to do this, you’ll have to contact whoever wrote the library and ask if they want to do it.

I’ll do that as a last resort, but I’d like to try to figure this out on my own. I don’t have any experience writing/editing libraries, but I’d like to learn. Now seems as good a time as any.

I’ll do some research based on your advice. Do you have any clue as to why I’d be getting this error when it seems like everyone else is able to use the LiquidCrystal440 library without issue? I haven’t gotten a chance to try compiling this on another computer, but I’ll be interested to see if I have different results.

Thanks again for the advice. I’ll post updates as I progress.

I just tried it on another computer, same result. If it matters, one computer was running Windows 7, the other was running XP. I tried software versions 0.18, 0.22, and 1.0 on the Windows 7 machine and 1.0 on the XP.

OK, just wondering if this ever got resolved? I'm using an older 40 x 4 LCD module wired for 4-bit mode with an Uno R3 and I'm getting the same compile error with Arduino 1.0 under Windows XP. I've tried specifying 255 for the RW pin, as well as specifying an unused pin with the same results.

Both halves of the LCD work fine with the standard LCD library -- just can't get the project to compile with the 4x40 library.

To fix it just change the write() functions in LiquidCrystal440.h and LiquidCrystal440.cpp to return size_t instead of void.

Thanks, I’ll give that a shot when I get back to the house. Sure didn’t want to waste those $5 40 x 4 displays I bought 10 years or so ago.

No joy. Could not find the statements in either file as you referenced. However, I did set it up as two separate displays using the standard lcd library -- sharing the RS and data pins and specifying a different enable pin for each display. Worked like a charm.

C:\Program Files (x86)\Arduino 1.0\arduino-1.0\libraries\Liquidcrystal440/LiquidCrystal440.h:92: error: conflicting return type specified for 'virtual void LiquidCrystal::write(uint8_t)' C:\Program Files (x86)\Arduino 1.0\arduino-1.0\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

From this error message in the first post it looks like one if the write functions is at line 92 in LiquidCrystal440.h.

Do you get the same error when you try to use that library?

I'm having this issue - did this get resolved at all? I'm wanting to use LiquidCrystal440 as LiquidCrystal isn't working with my LCD and is skewed by a nibble.

After putting LiquidCrystal440 into my Arduino libraries, I'm getting more or less the same compilation errors.

Can someone help? Something is getting conflicted I think...

After putting LiquidCrystal440 into my Arduino libraries, I'm getting more or less the same compilation errors.

You have some code you haven't showed up. You are using an old library that you haven't provided a link to. You are hand waving about the error messages.

You haven't a hope of getting help until you resolve these issues.