Compiler not regonizing library eventhough i install it from the IDE

Ok here is what i did
library manager > install U8g2 library
then
file > example > U8g2 > hello world
when i verify i got this error

HelloWorld:37:10: fatal error: U8g2lib.h: No such file or directory
compilation terminated.
exit status 1
U8g2lib.h: No such file or directory

I download the library from the software and example from the software so why isn't the compiler recognizing the library.

EDIT: this happen with every library I try to add

Welcome to the forum

How exactly are you installing the libraries ?
What is the full path to your sketchbook folder ?
Does the sketchbook folder have a libraries folder within it and if so, what folders are within it ?

Which version of the IDE?
Where are your sketches and libraries located? On C:\Users\yourUsername\Documents\Arduino? Or on some network drive / onedrive?

I am installing library from the IDE itself
like Tools > Library manager > then I search for U8g2 and download it
for the path to library C:\Users\Myusername\OneDrive\Documents\Arduino\libraries

Pretty sure its on onedrive does that cause a problem?
IDE version 1.8.19

It might. I don't use onedrive so don't know but testing should be easy.

  1. Change the sketchbook directory in file → preferences in the IDE.
  2. Install a (problematic) library, open an example and check if it compiles.

If it compiles, you know that it's onedrive related. I don't know if there is a solution but you might find one using e.g. arduino onedrive - Google Search

1 Like

It work!
I spend so much time fixing this, Thank you bro you save me

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