platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
332 stars 219 forks source link

build fails with error: 'ethernet_input_LWIP2' was not declared in this scope #102

Closed borisneubert closed 6 years ago

borisneubert commented 6 years ago

Please see minimal PlatformIO project https://github.com/borisneubert/W5500-example

build fails with:

Compiling .pioenvs/d1_mini/lib56b/ESP8266WiFi/ESP8266WiFiMulti.cpp.o
In file included from /users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/lwip/arch.h:48:0,
from /users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/lwip/debug.h:40,
from /users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/lwipopts.h:3004,
from /users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/lwip/opt.h:51,
from /users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/lwip/netif.h:40,
from .piolibdeps/W5500lwIP/w5500-lwIP.cpp:8:
.piolibdeps/W5500lwIP/w5500-lwIP.cpp: In member function 'err_t Wiznet5500lwIP::start_with_dhclient()':
/users/neubert/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip2/include/arch/cc.h:124:24: error: 'ethernet_input_LWIP2' was not de
clared in this scope
#define ethernet_input ethernet_input_LWIP2
^
.piolibdeps/W5500lwIP/w5500-lwIP.cpp:53:66: note: in expansion of macro 'ethernet_input'
if (!netif_add(&_netif, &ip, &mask, &gw, this, netif_init_s, ethernet_input))
^
*** [.pioenvs/d1_mini/lib15f/W5500lwIP/w5500-lwIP.cpp.o] Error 1

I was led there by #65.

How can I compile with lwip2?

borisneubert commented 6 years ago

Issue solved here: d-a-v/W5500lwIP#3

Need to include

#include <netif/ethernet.h>