Arduino IDE libraries not working

Hello!

My arduino IDE Library shows an error saying "No such file or directory" while im using LiquidCrystal_I2C. I've tried the examples to make sure it works, and it still doesnt seem to compile. As a last effort, I've also changed the example file from .pde to .ino as im using Arduino IDE v2

I'm pretty sure the coding is all fine as I've ran it through a friend's computer and it worked. I am certain that this is a integral problem with my Arduino IDE app as a whole.

I've been stuck with this problem for 6 months straight and gouging my eyes out over this problem! Please, send help

Hi @talesbyz. I'm going to ask you to provide the full verbose output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  7. Open a forum reply here by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  9. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

1 Like

FQBN: arduino:avr:mega
Using board 'mega' from platform in folder: C:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega C:\Users\USER\AppData\Local\arduino\sketches\A7EB72DF7EBB875403C2195CB2972E45\sketch\HelloWorld.ino.cpp -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src C:\Users\USER\AppData\Local\arduino\sketches\A7EB72DF7EBB875403C2195CB2972E45\sketch\HelloWorld.ino.cpp -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal I2C@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal I2C@1.1.2]
C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\mega -IC:\Users\USER\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire\src -IC:\Users\USER\OneDrive\文档\Arduino\libraries\LiquidCrystal_I2C C:\Users\USER\AppData\Local\arduino\sketches\A7EB72DF7EBB875403C2195CB2972E45\sketch\HelloWorld.ino.cpp -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal I2C@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal I2C@1.1.2]
C:\Users\USER\OneDrive\文档\Arduino\libraries\LiquidCrystal_I2C\examples\HelloWorld\HelloWorld.ino:5:10: fatal error: LiquidCrystal_I2C.h: No such file or directory
compilation terminated.
exit status 1

Compilation error: LiquidCrystal_I2C.h: No such file or directory

Alright, Here you go!
Thanks for the help

Unfortunately there is a bug in Arduino IDE that causes it to not recognize libraries when they are installed under a path that contains non-ASCII characters (e.g. 文档).

The workaround is to change the location where libraries are stored by Arduino IDE to one that is under a path without any non-ASCII characters. I'll provide instructions you can follow to do that:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Set the path in the "Sketchbook location" preference to a location that does not contain any non-ASCII characters in its path.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Move the contents of the folder at the previous path of the "Sketchbook location" preference (C:\Users\USER\OneDrive\文档\Arduino) to the new location.
1 Like

Are all your sketches and libraries folder on OneDrive?

Sorry for the late reply,

But thankfully, it worked!
Thank you for the solution :smiley:

You are welcome. I'm glad it is working now.

Regards, Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.