Hi people
I have been trying to install ESP8266 boards and library’s on Arduino ide but keep coming up with the same error:
D:\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory
the library for ESP8266 is ESP8266Wifi
At the moment I have 1.6.9 installed but have tried 1.6.7 with the same result
is anyone else having this problem ? does anyone know if it is an ide problem or am I doing something silly ?
any help would be appreciated


The “functional” header file doesn’t seem to be included in the AVR compiler. Did you select the ESP8266 board before trying to compile your ESP8266 sketch.

Maybe ‘#include <functional**.h**>’ could help?

Maybe ‘#include <functional**.h**>’ could help?

#include is correct, see <functional> - C++ Reference.

It seems strange that you have the library installed at D:\Arduino\libraries\ESP8266WiFi. Since this library is bundled with the esp8266 core, it would normally be located somewhere like C:\Users\per\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi. That line is not present in the ESP8266WiFi library included with the latest stable version(2.2.0) so it appears you are using the staging version or something. I recommend you use the stable version unless you really know what you’re doing.

Please provide more information on what you are trying to achieve.

#include is correct, see <functional> - C++ Reference.

Like limits, string, random, etc? I do not buy that interpretation.

I do not buy that interpretation.

Why not? I believe this is the file included with the esp8266 Arduino core toolchain: gcc-xtensa/functional at call0-4.8.2 · jcmvbkbc/gcc-xtensa · GitHub I find it at c:\users\per\appdata\local\arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2\xtensa-lx106-elf\include\c++\4.8.2\functional in my esp8266 Arduino core v2.2.0 installation.

Ok, I convinced.

hi all
thank you for your replies, the problem mysteriously 'went away'
I stripped out arduino completely (deleting files in user/etc as well as uninstall)
then re-installed with completely new download of the latest version of arduino, new download of esp8266, re built the boards and everything works fine so I can only assume it was some sort of corruption in one of my previous downloads
thanks again for the help I was really confused


Use single quotes for single characters. Use double quotes for string literals.

Arduino: 1.8.4 (Windows 10), Board: “Arduino/Genuino Uno”

In file included from E:\melki file\download\arduino-1.8.4-windows\arduino-1.8.4\libraries\ESP8266WiFi\src/ESP8266WiFiSTA.h:28:0,

from E:\melki file\download\arduino-1.8.4-windows\arduino-1.8.4\libraries\ESP8266WiFi\src/ESP8266WiFi.h:34,

from E:\melki file\Anoa_Robotik\IOT\Program IoT Starter Kit\Project_1_Kontrol_LED\Project_1_Kontrol_LED.ino:9:

E:\melki file\download\arduino-1.8.4-windows\arduino-1.8.4\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory



compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

The ESP8266WiFi library is only for use when compiling for an ESP8266 board. You have absolutely no chance of making it work with your Uno. The ESP8266WiFi library comes pre-installed with the ESP8266 core for Arduino so having it installed separately is only going to cause you problems. To avoid that, please delete this folder: E:\melki file\download\arduino-1.8.4-windows\arduino-1.8.4\libraries\ESP8266WiFi. Please be very careful when deleting things on your computer. When in doubt, back up!

FYI, it’s a really bad idea to install anything to the Arduino IDE installation folder. The reason is that it will all be lost when you update to a new version of the Arduino IDE. This is why we install libraries to the libraries subfolder of the sketchbook folder, as described in these instructions:

If you actually are using an ESP8266 board (not an ESP8266 module attached to your Uno) instead of an Uno, then you need to select the correct board from the Tools > Board menu. If you are indeed using an Uno, then you will need to find some different code to use or buy an ESP8266 board.