ESP8266WiFi library "Missing File"

In Arduino master library for ESP8266WiFi two file has been missing. I have do lot of Search for that but i didn't get it. following is compilation error for ESP8266WiFi library.

In ESP8266WiFiGeneric.h ,
#include
#include

these two files are included but while compiling

C:\Users\DSI\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory
#include
and also

C:\Users\DSI\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: memory: No such file or directory
#include

What board are you compiling for?

Just to keep things linked, here's the original issue report from the arduino-builder repository where I requested that @Saylictron instead request assistance here on the forum as the problem is unlikely to be caused by a bug in arduino-builder:

@Saylictron, when you encounter an error in the Arduino IDE you'll see a button on the right side of the orange bar "Copy error messages". Click that button and then paste the error to the forum USING CODE TAGS (</> button on the toolbar). This will provide extra information, which would have answered PaulS's question and gotten you a faster resolution to your problem. The code tags are important because the forum software may interpret parts of error or warning messages or code as markup, causing problems similar to the one we saw in your GitHub issue report.

PaulS:
What board are you compiling for?

helo PaulS, My project use Arduino Uno with ESP8266 v1, i add library ESP8266wifi.h and error like Saylictron appear. How can i resolve this,please.

C:\Users\DSI\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: functional: No such file or directory

#include
and also

C:\Users\DSI\Documents\Arduino\libraries\ESP8266WiFi\src/ESP8266WiFiGeneric.h:27:22: fatal error: memory: No such file or directory

#include

Thanks

You need to understand there are two different ways of using the ESP8266 with Arduino:

  • ESP8266 as a WiFi adapter controlled by a standard Arduino board. This is the way you're using it. This is most commonly done by controlling the ESP8266 running the AT firmware by sending serial commands but that is not the only option.
  • Directly programming an ESP8266.

The ESP8266WiFi library can only be used with the esp8266 Arduino core:

to directly program the ESP8266 used in the second way listed above. You cannot use it on the Arduino Uno.

There is a library with a confusingly similar name:

(note capitalization difference!). That can be used on an Arduino Uno to control an ESP8266 running the AT firmware. The sketches written for the ESP8266WiFi library can not be used with the ESP8266wifi.

I actually recommend a different library for that configuration:

I have the same issue.

Thank you pert for your info

pert:
You need to understand there are two different ways of using the ESP8266 with Arduino:

  • ESP8266 as a WiFi adapter controlled by a standard Arduino board. This is the way you're using it. This is most commonly done by controlling the ESP8266 running the AT firmware by sending serial commands but that is not the only option.
  • Directly programming an ESP8266.

The ESP8266WiFi library can only be used with the esp8266 Arduino core:
GitHub - esp8266/Arduino: ESP8266 core for Arduino
to directly program the ESP8266 used in the second way listed above. You cannot use it on the Arduino Uno.

There is a library with a confusingly similar name:
GitHub - ekstrand/ESP8266wifi: ESP8266 Arduino library with built in reconnect functionality
(note capitalization difference!). That can be used on an Arduino Uno to control an ESP8266 running the AT firmware. The sketches written for the ESP8266WiFi library can not be used with the ESP8266wifi.

I actually recommend a different library for that configuratio n:
GitHub - bportaluri/WiFiEsp: Arduino WiFi library for ESP8266 modules

The problem is I have followed steps to use ESP8266 through Arduino/Genuino UNO as slave. I have install the ESP8266 board and I can compile without problems but I cant upload the object to the board, and viceversa.

So, the problem is IDE cant compile with special headers functional and memory from ESP8266WiFi.h

...

#ifndef ESP8266WIFIGENERIC_H_
#define ESP8266WIFIGENERIC_H_

#include "ESP8266WiFiType.h"
#include <functional>
#include <memory>

#ifdef DEBUG_ESP_WIFI
....

the framework I am using is Machine building tutorial 2 · tinkerspy/Automaton Wiki · GitHub

Thanks to all

yowelf:
I can compile without problems but I cant upload the object to the board, and viceversa.

So, the problem is IDE cant compile with special headers functional and memory from ESP8266WiFi.h

First you say you can compile, then you say you can't compile. Which is it?

yowelf:
the problem is IDE cant compile with special headers functional and memory from ESP8266WiFi.h

...

#ifndef ESP8266WIFIGENERIC_H_
#define ESP8266WIFIGENERIC_H_

#include "ESP8266WiFiType.h"
#include
#include

#ifdef DEBUG_ESP_WIFI
....




the framework I am using is https://github.com/tinkerspy/Automaton/wiki/Machine-building-tutorial-2

There's no mention of ESP8266WiFi.h anywhere in that library or that wiki page.

Please read this again:

pert:
You need to understand there are two different ways of using the ESP8266 with Arduino:

  • ESP8266 as a WiFi adapter controlled by a standard Arduino board. This is the way you're using it. This is most commonly done by controlling the ESP8266 running the AT firmware by sending serial commands but that is not the only option.
  • Directly programming an ESP8266.

The ESP8266WiFi library can only be used with the esp8266 Arduino core:
GitHub - esp8266/Arduino: ESP8266 core for Arduino
to directly program the ESP8266 used in the second way listed above. You cannot use it on the Arduino Uno.

First you say you can compile, then you say you can't compile. Which is it?

Sorry I did a mistake writing. I wanted to say if I select the board as esp8266 in the preferences of the IDE, the sketch compiles fine, but logically i cant upload to the board because fails when try to communicate with it. esp not sync. The IDE uses the library charged with the board update and c++ functional and memory calls run.

When I select the Arduino/Genuino UNO board i cant compile although I copy the library "locally" for this project. I understand this a mad solution, beacuse the differences of the chips are widely and for that exist the special repository to use esp8266 from the arduino core, but the example code says the opposite..

There's no mention of ESP8266WiFi.h anywhere in that library or that wiki page.

the last point of the example shows how to manage the machine with a web browser. To add this functionality, we need to include this header

<Atm_esp8266.h>

and start an instance

Atm_esp8266_httpd_simple server( 80 )

the header Atm_esp8266.h just calls to ESP8266WiFi.h and others,

#pragma once

#include <Automaton.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <WiFiUdp.h>
#include <Hash.h>

#include <Atm_esp8266_httpd_simple.hpp>
#include <Atm_esp8266_httpc_simple.hpp>
#include <Atm_esp8266_wifi.hpp>

extern Atm_esp8266_wifi wifi;

I understand both ways to use ESP8266, but this example have to use the ESP8266 board as slave and Arduino/Genuino UNO as main. We can compile and run code directly to de esp8266 board, but this code with IO pins needs this structure or similar,

thanks for the help

yowelf:
the last point of the example shows how to manage the machine with a web browser.

OK, that's a different library and it is written only for use directly on the ESP8266.

yowelf:
have to use the ESP8266 board as slave and Arduino/Genuino UNO as main. We can compile and run code directly to de esp8266 board, but this code with IO pins needs this structure or similar

You'll either need to find different code to use or you'll need to rewrite the Automaton-Esp8266 library to work for your application.

very thanks pert.

I am trying to contact with the developer of this framework to take advice.

Finally,

The code was suitable for a non regular ESP8266. The code works perfect using a Wemos D1 board. It has the connection capabilty of the ESP8266 and i/o pins to interact with it.

Thanks to de developer (tinkerspy)