Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ESP8266WebServer.h, "functional: No such file or directory"

Tags:

c++

arduino

iot

I tried to install library ESP8266WebServer into platformio IDE. I got this error "functional: No such file or directory". A bit of research of "functional", http://www.cplusplus.com/reference/functional/

In file included from configMode.cpp:13:0:
.pioenvs/uno/ESP8266WebServer/ESP8266WebServer.h:27:22: fatal error: functional: No such file or directory
#include <functional>
^
compilation terminated.
like image 379
kenpeter Avatar asked May 03 '16 07:05

kenpeter


2 Answers

In my case the very same error happened when I was trying to

#include <ESP8266WebServer.h>

in a .c file.

It should be .cpp in order to compile without errors.

like image 95
hypers Avatar answered Nov 17 '22 10:11

hypers


I had this problem, but realised I had the wrong board set in the Arduino IDE. If you haven't installed the Arduino core for ESP8266 (https://github.com/esp8266/Arduino#installing-with-boards-manager) do so, then select the correct board from the Arduino IDE Tools menu.

I now have other compiler errors though.

like image 1
FoxyLad Avatar answered Nov 17 '22 10:11

FoxyLad