DHTester example fails

I have downloaded and installed the DHT11 library as instructed. I loaded File → Examples → DHT Sensor Library → DHTester but when I compile it I get

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Rick\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Rick\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10613 -build-path C:\Users\Rick\AppData\Local\Temp\arduino_build_511383 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose D:\TheMill\Arduino\ElectronicsProjects\_New Projects\DHTtester\DHTtester.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Rick\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Rick\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries -fqbn=arduino:avr:uno -vid-pid=0X2A03_0X0043 -ide-version=10613 -build-path C:\Users\Rick\AppData\Local\Temp\arduino_build_511383 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose D:\TheMill\Arduino\ElectronicsProjects\_New Projects\DHTtester\DHTtester.ino
Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\Rick\AppData\Local\Temp\arduino_build_511383\sketch\DHTtester.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-ID:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries\DHT-sensor-library-master" "C:\Users\Rick\AppData\Local\Temp\arduino_build_511383\sketch\DHTtester.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-ID:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries\DHT-sensor-library-master" "C:\Users\Rick\AppData\Local\Temp\arduino_build_511383\sketch\DHTtester.ino.cpp" -o "C:\Users\Rick\AppData\Local\Temp\arduino_build_511383\preproc\ctags_target_for_gcc_minus_e.cpp"
In file included from D:\TheMill\Arduino\ElectronicsProjects\_New Projects\DHTtester\DHTtester.ino:2:0:

D:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries\DHT-sensor-library-master/DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory

 #include <Adafruit_Sensor.h>

                             ^

compilation terminated.

Using library DHT-sensor-library-master at version 1.3.0 in folder: D:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries\DHT-sensor-library-master 
exit status 1
Error compiling for board Arduino/Genuino Uno.

Now, the trick is that the line #include <Adafruit_Sensor.h> does not appear in DHTester.ino so the problem must exist in either #include <DHT.h> or #include <DHT_U.h>
.

How do I fix this?
Thanks

The error message tells you exactly where that line is:

D:\TheMill\Arduino\ElectronicsProjects\_New Projects\libraries\DHT-sensor-library-master/DHT_U.h:25:29: fatal error: Adafruit_Sensor.h: No such file or directory

 #include <Adafruit_Sensor.h>

                             ^

Line 25 of D:\TheMill\Arduino\ElectronicsProjects_New Projects\libraries\DHT-sensor-library-master/DHT_U.h

vagulus:
I have downloaded and installed the DHT11 library as instructed.

But in fact you didn’t follow the full instructions:

You must have the following Arduino libraries installed to use this class:

Adafruit Unified Sensor Library

vagulus:
How do I fix this?

The solution for the “No such file or directory” error is almost always to install the library that contains the missing file.

Thanks pert
I had missed that extra header.

While on the subject of headers, the program DHTester.ino starts

#include <DHT.h>
#include <DHT_U.h>

// Example testing sketch for various DHT humidity/temperature sensors
// Written by ladyada, public domain

#include "DHT.h"

Why does #include DHT.h appear twice, once on angle brackets and once in quotes?

In fact it does not appear in the original sketch:

You added those lines. You probably did this inadvertently by clicking Sketch > Include Library > DHT Sensor Library, which simply adds includes for the library files to the top of the sketch that’s currently open.

The #include <DHT.h> syntax tells the compiler to search the standard libraries folders for the file DHT.h. The #include “DHT.h” syntax tells the compiler to first search the local folder (the folder containing the DHTester.ino sketch in this case), then the standard libraries folders. Since DHT.h is in one of the standard libraries folders either syntax will work but the angle brackets syntax is actually more correct. It just goes to show that you shouldn’t assume that other people’s code is perfect, even when it comes from a supposedly trustworthy source such as Adafruit.

Thanks pert