9

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.
kenpeter
  • 7,404
  • 14
  • 64
  • 95

2 Answers2

4

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.

hypers
  • 1,045
  • 1
  • 12
  • 30
1

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.

FoxyLad
  • 1,616
  • 11
  • 12