Example Programm dosn´t find its own library

Im trying to test the LSM303DLHC.
I installed the library "Adafruit LSM303DLHC", then opended the Example-Programm "magsensor" but it can´t find it´s own librarys.

Arduino: 1.8.9 (Windows 10), Board: "Arduino Leonardo"

magsensor:2:29: error: Adafruit_Sensor.h: No such file or directory

compilation terminated.

exit status 1
Adafruit_Sensor.h: No such file or directory

I don´t know, what to do, it would be very nice, if someone replies, thank you.

exit status 1
Adafruit_Sensor.h: No such file or directory

Did you install this library?

Do you mean "Adafruit_Sensor.h"? Yes, I used the Example Programm out of the Library it´s Folder.

You're using the example sketch from the Adafruit LSM303DLHC library. That library has a dependency on the Adafruit Unified Sensor library. So you need to install that library as well.

This is a fairly common thing in Arduino libraries. Just as our sketches benefit from using shared code in libraries, libraries can benefit from using shared code from other libraries. Ideally, the library author will clearly document the dependencies, as Adafruit usually does. Other times, the library author won't have bothered to write that documentation and you'll need to go on a scavenger hunt for the library dependencies.

Thanks a lot for your very detailed answer, now it works!

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

and next version of IDE will handle it

source: Redirecting to Google Groups