Incompatible typedef definitions of FILE

I have imported an arduino project into PlatformIO that successfully compiled under Arduino. I cannot successfully compile it under PlatformIO because there are two incompatible typedefs for FILE;

  1. typedef __FILE FILE; (In C:/Users/User/.platformio/packages/framework-arduinoespressif32/tools/sdk/include/newlib/wchar.h:52:16)
  2. typedef struct __file FILE; (In C:/Users/User/Documents/Arduino/libraries/stdio/src/stdio.h:275:23)

How can I disentangle the relevant libraries.

This library that you’ve added via lib_extr_dirs is messing with the standard C includes. Please only use lib_deps to explicitly select the libraries you need. Alternatively, add lib_ignore = stdio to the platformio.ini to remove that weird library the dependencies.

Thankyou for that pointer - I’ve a lot to learn!

Is your error solved?

Yes thankyou all sorted