Conflicting return type specified for 'virtual void LiquidCrystal:write(uint8_t)

Hi, I am interfacing a parallel LCD to display a message. I have encountered with a compilation error as follows. I have included the LiquidCrystal.h library downloaded from Arduino site. Do anyone have any idea? Please help me.

Thanks in advance. DNRay

In file included from Simple_LCD.cpp:1: C:\Documents and Settings\SR Lab\My Documents\Arduino\libraries\LiquidCrystal/LiquidCrystal.h:86: error: conflicting return type specified for 'virtual void LiquidCrystal::write(uint8_t)' C:\Program Files\arduino 1.1\hardware\arduino\cores\arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

This was one of two changes between IDE 0.xx and 1.00 that bite people. The virtual function 'write' in the Print class that most packages use changed from returning void to returning a size_t (presumably the number of bytes written). The other is changing the include files WProgram.h and WConstants.h to arduino.h. So you might want to search around for a version of LiquidCrystal that is compatible with the IDE you are using.

Thank you very much. Then I will look for a compatible LiquidCrystal.h library.

The current IDEs are supplied with a LiquidCrystal library that compiles ok.

Hi, Do you refer to version 1.0.1 by current IDE? I would like to request you please let me know where can I get the updated LiquidCrystal.h library? Please help me.

Thanks in advance.

It's supplied when you download the IDE.

Ok. Thank you very much for your help. I will let you know after I fix the problem.

So if you have 1.01 you may have installed the old LiquidCrystal library in your sketchboard directory, and it should be a simple matter of deleting the local copy so the system version can be used.

I have installed Arduino 1.0.1. But the problem still persists. What to do now?

Make sure you have no other LiquidCrystal libraries installed, as MichaelMeissner said.

OK. I have the older version of Arduino 1.0 in the same directory. I will delete it & then report it.

Hi! I have tried all the means. I have removed the old Arduino 1.0 files, libraries and then installed the Arduino 1.0.1 files. But the same result is persisting. I am puzzled. I hope the mistake is in the LIQUIDCRYSTAL.H file. It is expected to provide no output (void), but the programme is asking some return at the end. How to cope with the LIBRARY FILE? I have done all the motor programming, LED display, sensor data reading etc. But I have stucked here. Please help me.

I have attached the copy I have on my computer - it is exactly the one which came with the distribution.

LiquidCrystal.zip (15.2 KB)

Hi, Sorry to inform you that the same result persists. I have removed the older library of LiquidCrstal & in that place I put your library. But the same error message is showing. I am totally disapointed.

Where are you putting the library? The files should be here:
\libraries\LiquidCrystal\

virtual void write()
is NOT declared in LiquidCrystal.h like that error says it is, which suggests you have put the library in the wrong location and it is still using the old one.

Also, did you restart the IDE after copying in the new library.

I have put the libraries in the location as mentioned by you. Have a look at the path below. C:\Documents and Settings\SR Lab\My Documents\arduino-1.0.1\libraries\LiquidCrystal Probably you are referring to this path also. But still it doesn't run. I have restarted the IDE even my computer. But the problem is remaining as it is. Now, I am trying with serail LCD.