Hello,
I’ve been using platformIO extension for vscode to develop my esp32 projects. I’ve never had problems compiling and uploading projects, but in the last few days none of my (working) projects compile properly anymore.
These are the errors I get:
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:112:5: error: 'ip_addr_t' does
not name a type
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:166:49: error: 'tcpip_adapter_ip_info_t' has not been declared
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:182:49: error: 'tcpip_adapter_ip_info_t' has not been declared
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:407:72: error: 'ip6_addr_t' has not been declared
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:609:76: error: 'tcpip_adapter_sta_list_t' has not been declared
C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/tcpip_adapter/tcpip_adapter.h:665:1: error: expected declaration before '}' token
I tried to reinstall vscode and platformio as well as trying it on atom. Could this be caused by a platformio update? Maybe something related to the internal platformio libraries?
PS: It seems that even including only the Wifi.h library also causes the same error.
I can’t reproduce that on my end… I have no compile errors sing your platformio.ini environment, against the current ESP32 board support, and only including the libraries you listed with an empty setup and loop. I did add lib_deps = 306 so that the ESPAsyncWebServer library and dependencies got installed, that shouldn’t change anything, as your errors seem to be coming from something within the core. Maybe it’s worth deleting the platform files, and getting PlatformIO to re-download/reinstall them, in case there is some file corruption going on? (PIO Home -> Platforms -> Installed -> Espressif 32 -> Uninstall)?
Otherwise, you could perhaps look at C:/Users/Afonso Muralha/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/lwip/lwip/ip_addr.h , and see if you have the definition for ip_addr_t there between lines 69 and 76… as it is where it looks to be defined… if it’s not there… something is missing!
So, I reinstalled the platform files, cleaned the project and tried to recompile. Still having the same issue.
I tried the same thing but with and older version (1.4.0) and it seems to be working now. I have no idea how that fixed it .