Compile Error with ip_addr.h

I’m trying to compile this funny little project:

and I’m getting the following error:

/Users/jason/.platformio/packages/framework-arduinoespressif/tools/sdk/lwip/include/lwip/ip_addr.h:223:43: error: invalid cast from type ‘IPAddress’ to type ‘u8_t* {aka unsigned char*}’

I’ve tried on three different machines, running OSX and Win7.

The code can be downloaded from here:

Does anyone have any suggestions on how to fix this?



Hi @jason!
Could you try to compile your project without LWIP_OPEN_SRC define?
Please add this line to your environment in platformio.ini:

build_flags = -ULWIP_OPEN_SRC

@valeros Great! Thank you so much, that did the trick perfectly!

I changed the line:

build_flags = -Wl,-Tesp8266.flash.4m.ld


build_flags = -ULWIP_OPEN_SRC,-Wl,-Tesp8266.flash.4m.ld

and it compiled with no errors.

There were several people over at who were having the same problem, so I’ll link over to here with the solution.

Thanks again.



Great! But remove the extra comma to build the 4MB SPIFFS file system.

build_flags = -ULWIP_OPEN_SRC -Wl,-Tesp8266.flash.4m.ld