This issue is very common and there are many threads about this.
But unfortunately this forum has no search capability.
They removed it and instead replaced with a fairly useless google search of the site so it is very difficult to find old threads.
ZinggJM:
I am confused, because it seems you report two different errors.The error with #include "WProgram.h" may indicate you use a library made for a very old version of the Arduino IDE. If this #include "WProgram.h" is in an actual library, it is conditional, in effect only of old Arduino versions.
Jean-Marc
That isn't necessarily true. There are some versions of the IDE that are very broken.
They didn't use the C pre-processor and attempted to locate the header files themselves using java code.
The issue is that those IDE versions will attempt to locate header files even thought they are inside conditionals that should hide them.
The issue in this case is that the sketch is attempting to use a library that either is not installed or installed incorrectly.
LiquidCrystal_I2C libraries are a real mess.
I've written about this in MANY threads.
The main reason that there are so many versions of them floating around out there.
Some are very old and may use header files that either no longer exist or have changed names.
Then there is the difference between the LiquidCrystal_I2C library and using the LiquidCrystal_I2C i/o class from fm's newLiquidCrystal library.
Both use the same name.
These are two completely different libraries and they initialized and work differently and have slightly different APIs.
The example sketch in the first post is expecting fm's newLiquidCrystal LiquidCrystal i/o class.
LiquidCrystal_I2C is available using the library manger.
fm's newLiquidCrystal library must be manually installed.
LiquidCrystal_I2C has hard coded PCF8574 pin mappings that may or may not work with given backpack.
newLiquidCrystal LiquidCrystal_I2C i/o class can work with any backpack but requires that the sketch configure the pin mappings in the lcd object constructor.
Both require configuring the i2c address of the backpack.
For an easier "plug and play" option, I'd suggest that you try using my hd44780 library package.
It includes an i/o class, hd44780_I2Cexp, that will automatically locate the i2c address and auto detect the pin mappings making it easier to use.
It includes a diagnostic sketch to test the i2c signals and the internal memory of the LCD module.
It can quickly and easily be installed using the IDE library manager.
You can read more about it here: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library
That page has additional information, including licensing information (GPLv3), along with s/w & h/w requirements, installation instructions, and a summary of the API functions available.
After installing the library the first thing to run is the diagnostic sketch I2CexpDiag.
--- bill