PlatformIO Community

Error compile ESP8266WebServer for NodeMCU

Hey. I use platformio as an extension for vscode. I really like platformio, but I don’t understand what happens when compiling libraries. Very rarely does a new connected library compile without errors. You have to fix the library code yourself. Often these are small things that can even be commented out or corrected, but this time I don’t know what to do. I am writing a small project with NodeMCU and Wifi Web Server. I install the latest versions of the ESP8266Wifi libraries from github. Pour the program into the board and get a compilation error. Error in the ESP8266mDNS library in the LEAmDNS.h file: 910: 9 and other Wifi libs (ESP8266WiFi, ESP8266WebServer)

Please help solve this error. I really like platformio and I don’t want to use the arduino ide anymore. Thanks for any help!

Error message:

Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 54 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
Compiling .pioenvs\nodemcuv2\src\main.cpp.o
Compiling .pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFi.cpp.o
Compiling .pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFiAP.cpp.o
Compiling .pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFiGeneric.cpp.o
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:56:15: error: 'virtual int WiFiClient::connect(IPAddress, uint16_t)' marked override, but does not override
virtual int connect(IPAddress ip, uint16_t port) override;
^
lib\ESP8266WiFi\src/WiFiClient.h:76:16: error: 'virtual void WiFiClient::stop()' marked override, but does not override
virtual void stop() override { (void)stop(0); }
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:40:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiServer.h:52:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'
WiFiClient available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:45:7: note:   because the following virtual functions are pure within 'WiFiClient':
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266WiFi\src/WiFiClient.h:27:0,
from lib\ESP8266WiFi\src/ESP8266WiFi.h:39,
from src\main.cpp:2:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src\WiFiClient.h:56:15: error: 'virtual int WiFiClient::connect(IPAddress, uint16_t)' marked override, but does not override
virtual int connect(IPAddress ip, uint16_t port) override;
^
lib\ESP8266WiFi\src\WiFiClient.h:76:16: error: 'virtual void WiFiClient::stop()' marked override, but does not override
virtual void stop() override { (void)stop(0); }
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:40:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src\WiFiServer.h:52:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'
WiFiClient available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src\WiFiClient.h:45:7: note:   because the following virtual functions are pure within 'WiFiClient':
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src\WiFiClient.h:56:15: error: 'virtual int WiFiClient::connect(IPAddress, uint16_t)' marked override, but does not override
virtual int connect(IPAddress ip, uint16_t port) override;
^
lib\ESP8266WiFi\src\WiFiClient.h:76:16: error: 'virtual void WiFiClient::stop()' marked override, but does not override
virtual void stop() override { (void)stop(0); }
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:40:0,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src\WiFiServer.h:52:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'
WiFiClient available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src\WiFiClient.h:45:7: note:   because the following virtual functions are pure within 'WiFiClient':
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src\WiFiClient.h:56:15: error: 'virtual int WiFiClient::connect(IPAddress, uint16_t)' marked override, but does not override
virtual int connect(IPAddress ip, uint16_t port) override;
^
lib\ESP8266WiFi\src\WiFiClient.h:76:16: error: 'virtual void WiFiClient::stop()' marked override, but does not override
virtual void stop() override { (void)stop(0); }
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:40:0,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src\WiFiServer.h:52:14: error: invalid abstract return type for member function 'WiFiClient WiFiServer::available(uint8_t*)'
WiFiClient available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFi.h:39:0,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src\WiFiClient.h:45:7: note:   because the following virtual functions are pure within 'WiFiClient':
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src/WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src/ESP8266WiFi.h:41,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h: In member function 'int BearSSL::WiFiClientSecure::getMFLNStatus()':
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:110:67: error: 'br_ssl_engine_get_mfln_negotiated' was not declared in this scope
return connected() && br_ssl_engine_get_mfln_negotiated(_eng);
^
In file included from lib\ESP8266WiFi\src/WiFiServerSecure.h:23:0,
from lib\ESP8266WiFi\src/ESP8266WiFi.h:41,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiServerSecureBearSSL.h: At global scope:
lib\ESP8266WiFi\src/WiFiServerSecureBearSSL.h:59:22: error: invalid abstract return type for member function 'BearSSL::WiFiClientSecure BearSSL::WiFiServerSecure::available(uint8_t*)'
WiFiClientSecure available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src/WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src/ESP8266WiFi.h:41,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:34:7: note:   because the following virtual functions are pure within 'BearSSL::WiFiClientSecure':
class WiFiClientSecure : public WiFiClient {
^
In file included from lib\ESP8266WiFi\src/WiFiClient.h:27:0,
from lib\ESP8266WiFi\src/ESP8266WiFi.h:39,
from src\main.cpp:2:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from src\main.cpp:4:0:
lib\ESP8266WebServer\src/ESP8266WebServer.h:98:22: error: invalid abstract return type for member function 'virtual WiFiClient ESP8266WebServer::client()'
virtual WiFiClient client() { return _currentClient; }
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:45:7: note:   since type 'WiFiClient' has pure virtual functions
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h: In member function 'int BearSSL::WiFiClientSecure::getMFLNStatus()':
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:110:67: error: 'br_ssl_engine_get_mfln_negotiated' was not declared in this scope
return connected() && br_ssl_engine_get_mfln_negotiated(_eng);
^
In file included from lib\ESP8266WiFi\src\WiFiServerSecure.h:23:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h: At global scope:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h:59:22: error: invalid abstract return type for member function 'BearSSL::WiFiClientSecure BearSSL::WiFiServerSecure::available(uint8_t*)'
WiFiClientSecure available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:34:7: note:   because the following virtual functions are pure within 'BearSSL::WiFiClientSecure':
class WiFiClientSecure : public WiFiClient {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFiAP.cpp:25:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from src\main.cpp:4:0:
lib\ESP8266WebServer\src/ESP8266WebServer.h:169:15: error: cannot declare field 'ESP8266WebServer::_currentClient' to be of abstract type 'WiFiClient'
WiFiClient  _currentClient;
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:45:7: note:   since type 'WiFiClient' has pure virtual functions
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from src\main.cpp:4:0:
lib\ESP8266WebServer\src/ESP8266WebServer.h: In member function 'virtual WiFiClient ESP8266WebServer::client()':
lib\ESP8266WebServer\src/ESP8266WebServer.h:98:22: error: invalid abstract return type for member function 'virtual WiFiClient ESP8266WebServer::client()'
virtual WiFiClient client() { return _currentClient; }
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:45:7: note:   since type 'WiFiClient' has pure virtual functions
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from src\main.cpp:4:0:
lib\ESP8266WebServer\src/ESP8266WebServer.h:98:40: error: cannot allocate an object of abstract type 'WiFiClient'
virtual WiFiClient client() { return _currentClient; }
^
In file included from lib\ESP8266WiFi\src/ESP8266WiFi.h:39:0,
from src\main.cpp:2:
lib\ESP8266WiFi\src/WiFiClient.h:45:7: note:   since type 'WiFiClient' has pure virtual functions
class WiFiClient : public Client, public SList<WiFiClient> {
^
In file included from lib\ESP8266mDNS\src/ESP8266mDNS_Legacy.h:47:0,
from lib\ESP8266mDNS\src/ESP8266mDNS.h:45,
from src\main.cpp:5:
lib\ESP8266WiFi\src/WiFiUdp.h: At global scope:
lib\ESP8266WiFi\src/WiFiUdp.h:98:13: error: 'IPAddress WiFiUDP::remoteIP()' marked override, but does not override
IPAddress remoteIP() override;
^
lib\ESP8266WiFi\src/WiFiUdp.h:100:12: error: 'uint16_t WiFiUDP::remotePort()' marked override, but does not override
uint16_t remotePort() override;
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h: In member function 'int BearSSL::WiFiClientSecure::getMFLNStatus()':
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:110:67: error: 'br_ssl_engine_get_mfln_negotiated' was not declared in this scope
return connected() && br_ssl_engine_get_mfln_negotiated(_eng);
^
In file included from lib\ESP8266WiFi\src\WiFiServerSecure.h:23:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h: At global scope:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h:59:22: error: invalid abstract return type for member function 'BearSSL::WiFiClientSecure BearSSL::WiFiServerSecure::available(uint8_t*)'
WiFiClientSecure available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:34:7: note:   because the following virtual functions are pure within 'BearSSL::WiFiClientSecure':
class WiFiClientSecure : public WiFiClient {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFi.cpp:25:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266mDNS\src/ESP8266mDNS.h:46:0,
from src\main.cpp:5:
lib\ESP8266mDNS\src/LEAmDNS.h:910:9: error: 'oneShotMs' in namespace 'esp8266::polledTimeout' does not name a type
esp8266::polledTimeout::oneShotMs m_Timeout;      // Used for probes and announcements
^
lib\ESP8266mDNS\src/LEAmDNS.h:978:17: error: 'oneShotMs' in namespace 'esp8266::polledTimeout' does not name a type
esp8266::polledTimeout::oneShotMs m_TTLTimeout;
^
lib\ESP8266mDNS\src/LEAmDNS.h:1081:9: error: 'oneShotMs' in namespace 'esp8266::polledTimeout' does not name a type
esp8266::polledTimeout::oneShotMs m_ResendTimeout;
^
*** [.pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFiAP.cpp.o] Error 1
*** [.pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFi.cpp.o] Error 1
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h: In member function 'int BearSSL::WiFiClientSecure::getMFLNStatus()':
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:110:67: error: 'br_ssl_engine_get_mfln_negotiated' was not declared in this scope
return connected() && br_ssl_engine_get_mfln_negotiated(_eng);
^
In file included from lib\ESP8266WiFi\src\WiFiServerSecure.h:23:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h: At global scope:
lib\ESP8266WiFi\src\WiFiServerSecureBearSSL.h:59:22: error: invalid abstract return type for member function 'BearSSL::WiFiClientSecure BearSSL::WiFiServerSecure::available(uint8_t*)'
WiFiClientSecure available(uint8_t* status = NULL);
^
In file included from lib\ESP8266WiFi\src/WiFiClientSecure.h:41:0,
from lib\ESP8266WiFi\src\WiFiServerSecure.h:20,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:41,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
lib\ESP8266WiFi\src/WiFiClientSecureBearSSL.h:34:7: note:   because the following virtual functions are pure within 'BearSSL::WiFiClientSecure':
class WiFiClientSecure : public WiFiClient {
^
In file included from lib\ESP8266WiFi\src\WiFiClient.h:27:0,
from lib\ESP8266WiFi\src\ESP8266WiFi.h:39,
from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:27:
C:\users\braga\.platformio\packages\framework-arduinoespressif8266\cores\esp8266/Client.h:29:21: note:  virtual int Client::connect(const IPAddress&, uint16_t)
virtual int connect(CONST IPAddress& ip, uint16_t port) =0;
^
In file included from lib\ESP8266WiFi\src\ESP8266WiFiGeneric.cpp:45:0:
lib\ESP8266WiFi\src\WiFiUdp.h:98:13: error: 'IPAddress WiFiUDP::remoteIP()' marked override, but does not override
IPAddress remoteIP() override;
^
lib\ESP8266WiFi\src\WiFiUdp.h:100:12: error: 'uint16_t WiFiUDP::remotePort()' marked override, but does not override
uint16_t remotePort() override;
^
In file included from src\main.cpp:4:0:
lib\ESP8266WebServer\src/ESP8266WebServer.h: In member function 'virtual WiFiClient ESP8266WebServer::client()':
lib\ESP8266WebServer\src/ESP8266WebServer.h:98:56: warning: control reaches end of non-void function [-Wreturn-type]
virtual WiFiClient client() { return _currentClient; }
^
*** [.pioenvs\nodemcuv2\src\main.cpp.o] Error 1
*** [.pioenvs\nodemcuv2\libb11\ESP8266WiFi\ESP8266WiFiGeneric.cpp.o] Error 1
============================================== [ERROR] Took 3.03 seconds ==============================================

** Source file to reproduce:**

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>

#ifndef STASSID
#define STASSID "your-ssid"
#define STAPSK  "your-password"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

ESP8266WebServer server(80);

void handleRoot();
void handleNotFound();

void setup() {
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
  }

  MDNS.begin("esp8266");

  server.on("/", handleRoot);
  server.onNotFound(handleNotFound);
  server.begin();
}

void loop() {
  server.handleClient();
  MDNS.update();
}

void handleRoot() {
  server.send(200, "text/plain", "hello from esp8266!");
}

void handleNotFound() {
  server.send(404, "text/plain", "File Not Found");
}

My platformio.ini file:

[env:nodemcuv2]
platform = espressif8266
board = nodemcuv2
framework = arduino
lib_ldf_mode = chain

Operating system: Windows 10 Pro build 17134
PlatformIO Version: 3.6.7

That source file and configuration builds fine for me.

Output
> Executing task in folder ESP8266WebServer test: platformio run <

Processing nodemcuv2 (platform: espressif8266; board: nodemcuv2; framework: arduino)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/nodemcuv2.html
PLATFORM: Espressif 8266 > NodeMCU 1.0 (ESP-12E Module)
HARDWARE: ESP8266 80MHz 80KB RAM (4MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 27 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP8266WebServer> 1.0
|   |-- <ESP8266WiFi> 1.0
|-- <ESP8266WiFi> 1.0
|-- <ESP8266mDNS> 1.2
|   |-- <ESP8266WiFi> 1.0
Retrieving maximum program size .pioenvs/nodemcuv2/firmware.elf
Checking size .pioenvs/nodemcuv2/firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA:    [===       ]  34.2% (used 28000 bytes from 81920 bytes)
PROGRAM: [===       ]  29.6% (used 309048 bytes from 1044464 bytes)
================================================================================= [SUCCESS] Took 1.37 seconds =================================================================================

Terminal will be reused by tasks, press any key to close it.

It looks like you have copies of core provided libraries (i.e. ESP8266WiFi) in your lib folder… why? This is most likely what is causing your problems.

2 Likes

Thank you very much! Indeed, I completely cleared the lib folder and everything compiled and loaded without problems! And how to find out the list of these default libraries?

1 Like

Excellent! To find the list, have a look at the libraries folder for that core. :wink:

Thank you very much, it helped me too =)

1 Like