ESP8266 Arduino: Linking against espressif SDK

Due to the crapitude of ESP8266 Arduino (read: lack of on receive callbacks for udp), I’m using the espressif sdk to set up a UDP server.

However, I’m not sure how to link against lwip library to get access to those symbols.

receiver.cpp:(.text._Z12receiver_runv+0xd5): undefined reference to `espconn_regist_recvcb(espconn*, void (*)(void*, char*, unsigned short))
receiver.cpp:(.text._Z12receiver_runv+0xea): undefined reference to `espconn_create(espconn*)'

I’ve tried adding -l and -L to the platformio.ini file, but with no luck:

[env:esp8266_apa102_v1]
platform = espressif
framework = arduino
board = esp12e
lib_use = WiFiManager, apa102, WiFiUDP, arduino
build_flags = -DESP8266_APA102_HW_VER=1 -std=c++11 -Wall -lliblwip -L~/.platformio/packages/framework arduinoespressif/tools/sdk/lib

What is the proper way of linking against the espressif sdk?

Do you still have problem with new PlatformIO 3.0?

Yes, the linking issues remain unchanged on 3.0.1

Please open issue here Issues · platformio/platform-espressif8266 · GitHub

I’ve just created stage version of development version. See comment

Could you try it?

I ended up using the lwip ip stack and linking against that works out of the box.
Danke.