I am trying to use an example of sketch (WIFIScan.ino) and i get an error of typedef redefinition in "include wifi.h" instruction, as reported in the picture below.
How can I solve this problem?
Thanks
I will take a swag, it is very hard to read. It appears you defined something in line 184 then again in line 202. Next time post according the directions of the forum.
This is not anything related to code @archet wrote.
This is a conflict between code in the lwIP component of the ESP-IDF:
and code in xtensa-esp32-elf-gcc:
#ifndef _SSIZE_T_DECLARED
typedef _ssize_t ssize_t;
#define _SSIZE_T_DECLARED
I believe this is the relevant bug report:
Even though the clangd language server used by Arduino IDE 2.x to provide the problem detection is not happy about that code, the sketch still compiles fine with GCC. So I would not worry about it.
In my experience with language servers in general (not specific to Arduino IDE 2.x), you have to be a bit "fuzzy" in interpreting the result. Sometimes they are very meaningful, other times you just have to ignore that red squiggle. Unfortunately, it can be difficult for the average user to determine which is which in the case of a cryptic problem like this, so they might cause undue concern or act as a "red herring".
Thanks, I will try to compile it and hope it will work.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.