IDE can't find header file

I am trying to verify/compile an INO file. The INO calls LiquidCrystal_I2C.h which the author of the code said was native to the IDE. I am running 1.8.9 on a Windows 7 desktop. I went out and found several places that had that header file and tried placing them in the sketch directory, in
C:\Users\Living Room\Documents\Arduino\libraries\LiquidCrystal_I2C
and in
C:\Arduino1.8.7\hardware\arduino\avr\libraries\LiquidCrystal_I2C
but every time I try to verify the file I get an error:
LiquidCrystal_I2C.h: No such file or directory

I tried using several different copies that I found on the web including here but none were recognized.

Can someone point me to what I am missing or tell me how to convince the IDE that the file is right where it is looking?

Last week I had trouble with the IDE recognizing some STM32 libraries and was told how to fix that but the IDE is apparently still having issues.

Thank you for your help.

Please post the program that causes the problem and also post the actual error message.

Also post a link to the author's advice about the location of the library.

...R

Hi,
Are you using the IDE to install the library zip files?
Or are you manually unzipping and copying?

What model Arduino are you using?

Tom... :slight_smile:

TomGeorge:
Are you using the IDE to install the library zip files?
Or are you manually unzipping and copying?

I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.

What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?

TomGeorge:
What model Arduino are you using?

Nano but the INO is specifically to program a ATMega328P bare chip so the Nano is nothing more than the programmer in this case.

Robin2:
Please post the program that causes the problem and also post the actual error message.

Also post a link to the author's advice about the location of the library.

...R

This is only the start of the INO but is also where it quits:
// LM: Modifications to: released_code_V2.0.ino
// LCD ( J6) and selected CAT commands ( J5)
// LCD is always enabled.

#define CAT // Comment this line to disable CAT

// Etherkit Si5351 - Arduino Libraries
// Etherkit Si53551 version 2.0.1, 12/15/2016
// Current version not backward-compatible

#include <si5351.h>
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h> // LM: Frequency display, etc.

Here is the IDE output with errors to the point where it quits:
Arduino: 1.8.9 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Arduino1.8.7\arduino-builder -dump-prefs -logger=machine -hardware C:\Arduino1.8.7\hardware -hardware C:\Users\Living Room\AppData\Local\Arduino15\packages -tools C:\Arduino1.8.7\tools-builder -tools C:\Arduino1.8.7\hardware\tools\avr -tools C:\Users\Living Room\AppData\Local\Arduino15\packages -built-in-libraries C:\Arduino1.8.7\libraries -libraries C:\Users\Living Room\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10809 -build-path C:\Download\AVR\HEX_Files -warnings=none -build-cache C:\Users\LIVING~1\AppData\Local\Temp\arduino_cache_689773 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose Z:\Amateur Radio\QRP\4SQRP\HillTopper\Firmware\NK0O\hilltopper20_display_and_rit_mod_and_CAT_NK8O\LCD_Test.ino
C:\Arduino1.8.7\arduino-builder -compile -logger=machine -hardware C:\Arduino1.8.7\hardware -hardware C:\Users\Living Room\AppData\Local\Arduino15\packages -tools C:\Arduino1.8.7\tools-builder -tools C:\Arduino1.8.7\hardware\tools\avr -tools C:\Users\Living Room\AppData\Local\Arduino15\packages -built-in-libraries C:\Arduino1.8.7\libraries -libraries C:\Users\Living Room\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10809 -build-path C:\Download\AVR\HEX_Files -warnings=none -build-cache C:\Users\LIVING~1\AppData\Local\Temp\arduino_cache_689773 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2 -prefs=runtime.tools.avrdude.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -prefs=runtime.tools.arduinoOTA-1.2.1.path=C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.2.1 -verbose Z:\Amateur Radio\QRP\4SQRP\HillTopper\Firmware\NK0O\hilltopper20_display_and_rit_mod_and_CAT_NK8O\LCD_Test.ino
Using board 'uno' from platform in folder: C:\Arduino1.8.7\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Arduino1.8.7\hardware\arduino\avr
WARNING: Category 'Device' in library Wio LTE Arduino Library is not valid. Setting to 'Uncategorized'
Detecting libraries used...
"C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino1.8.7\hardware\arduino\avr\cores\arduino" "-IC:\Arduino1.8.7\hardware\arduino\avr\variants\standard" "C:\Download\AVR\HEX_Files\sketch\LCD_Test.ino.cpp" -o nul
"C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino1.8.7\hardware\arduino\avr\cores\arduino" "-IC:\Arduino1.8.7\hardware\arduino\avr\variants\standard" "-IC:\Users\Living Room\Documents\Arduino\libraries\Etherkit_Si5351-2.0.1\src" "C:\Download\AVR\HEX_Files\sketch\LCD_Test.ino.cpp" -o nul
"C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino1.8.7\hardware\arduino\avr\cores\arduino" "-IC:\Arduino1.8.7\hardware\arduino\avr\variants\standard" "-IC:\Users\Living Room\Documents\Arduino\libraries\Etherkit_Si5351-2.0.1\src" "-IC:\Arduino1.8.7\hardware\arduino\avr\libraries\Wire\src" "C:\Download\AVR\HEX_Files\sketch\LCD_Test.ino.cpp" -o nul
"C:\Users\Living Room\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\5.4.0-atmel3.6.1-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10809 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Arduino1.8.7\hardware\arduino\avr\cores\arduino" "-IC:\Arduino1.8.7\hardware\arduino\avr\variants\standard" "-IC:\Users\Living Room\Documents\Arduino\libraries\Etherkit_Si5351-2.0.1\src" "-IC:\Arduino1.8.7\hardware\arduino\avr\libraries\Wire\src" "-IC:\Arduino1.8.7\hardware\arduino\avr\libraries\EEPROM\src" "C:\Download\AVR\HEX_Files\sketch\LCD_Test.ino.cpp" -o nul
hilltopper20_display_and_rit_mod_and_CAT_NK8O:13:78: error: LiquidCrystal_I2C.h: No such file or directory

compilation terminated.

Using library Etherkit_Si5351-2.0.1 at version 2.0.1 in folder: C:\Users\Living Room\Documents\Arduino\libraries\Etherkit_Si5351-2.0.1
Using library Wire at version 1.0 in folder: C:\Arduino1.8.7\hardware\arduino\avr\libraries\Wire
Using library EEPROM at version 2.0 in folder: C:\Arduino1.8.7\hardware\arduino\avr\libraries\EEPROM
exit status 1
LiquidCrystal_I2C.h: No such file or directory

instead of #include <LiquidCrystal_I2C.h>

use #include "LiquidCrystal_I2C.h"

with the file in your sketch directory

Southerner:
I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.

You must have done it wrong, otherwise you would not get that error. Please post a link to where you downloaded the library from and I'll give you detailed installation instructions.

Southerner:
What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?

Because either you misunderstood or the author of the code is wrong. The base IDE installation has never come with a library that contains a file named LiquidCrystal_I2C.h. It does come with the LiquidCrystal library, but that is for when you're using the non-I2C LCDs so it can't serve as an alternative to the library that contains LiquidCrystal_I2C.h.

What I do not understand is if that library is supposed to be part of the base IDE install then why do I need to find another one and even if it is part of the IDE or a separate 3rd party one why doesn't the IDE see it?

LiquidCrystal.h is a base Arduino library, but not LiquidCrystal_I2C.h.

I would delete what you have previously installed, and then use the library manager of the IDE to install the library. It will go to the libraries folder with the sketches.

cattledog:
I would delete what you have previously installed, and then use the library manager of the IDE to install the library. It will go to the libraries folder with the sketches.

Although generally I think that's excellent advice, in this case it might be a bad idea. The reason is that there are several libraries either called LiquidCrystal_I2C, or that contain a file named LiquidCrystal_I2C.h. These libraries have different APIs and it's not guaranteed that the one that happens to be found in Library Manager is the one the code was written to work with. So if the author of the code has recommended a specific LiquidCrystal_I2C library then I would recommend making sure you install that exact library. If that library happens to be in Library Manager then certainly use that installation method.

There is a second layer to this problem, and even if @Southerner gets the correct library, there is no guarantee that it will work with his I2C lcd display. There may be a different i2c address, and the i2c backpack to lcd pin mapping may not be the default setting of the library.

For these reasons the current best advice on i2c library confusion is to download Bill Perry's hd44780 library available through the library manager.

This library will auto detect the I2C address and the I2C backpack to LCD pin mapping. For the backpack displays, you want to use the hd44780_I2Cexp class.

#include <Wire.h>
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h> // include i/o class header

hd44780_I2Cexp lcd;

There is a diagnostic sketch to run if there are any issues.

Extensive documentation is here

I don't believe that there has ever been an issue with an api from a different i2c lcd library not being supported by hd44780.h, although if there is a call for init() rather than begin(cols, rows) a change will need to be made.

Bill Perry is an active participant in the Display forum and if there are complex issues which can not be solved by others, he will get involved.

Southerner:
I am manually unzipping the files, creating the directory in the Libraries directory and copying them into that directory.

Well use the IDE to unzip and place the library where it is suppose to go.
It will then also load any examples that the library may have.
Select "Sketch" ,"Include Library", "Add ZIP Library", then using the opened window, find your zip file and let the IDE open it.
The library should then appear in the "Include Library" as well as the Examples folder in the IDE.
Tom... :slight_smile:

I believe that if you manually install the library from a zip file, that you must exit and restart the IDE in order for the IDE to "see" the new library.

But, IMO, it is better to use libraries that are known by the IDE library manager and have the IDE install it without messing with zip files. Typically newer and better maintained libraries will be known by the IDE library manager.

--- bill

bperrybap:
I believe that if you manually install the library from a zip file, that you must exit and restart the IDE in order for the IDE to "see" the new library.

That was how it was with Arduino IDE 1.6.5 and older. With the modern IDE versions (and we know southerner is using 1.8.9), manual installation without restarting the IDE will not cause the "No such file or directory" error.

It is still necessary to restart the IDE before the manually installed library's examples will show up in the File > Examples menu or for the library to show in the Sketch > Include Library menu.

You know what, I had this very problem a couple of days ago. Could not get it to work at all. My IDE was unused for some time and was an older version, so I saved all my old sketches and uninstalled and reinstalled IDE.

I also used LiquidCrystal_PCF8574.h instead now and it works well for me.

krbruner:
You know what, I had this very problem a couple of days ago. Could not get it to work at all. My IDE was unused for some time and was an older version, so I saved all my old sketches and uninstalled and reinstalled IDE.

I also used LiquidCrystal_PCF8574.h instead now and it works well for me.

If you store your projects in a folder independent of the IDE folder, you do not have to save them;
This is a screenshot of my preferences page.


The IDE will also put the library directory in it as well, so when you do an update, you do not loose any projects or already downloaded and installed libraries.
Tom... :slight_smile: