Another example sketch with C errors?

I can’t imagine what it’s trying to tell me here, so I guess I’m soliciting comments. Comments have been helpful.

C:\Users\joema.platformio\lib\ArduinoFake\src/ArduinoFake.h: In member function ‘StreamFake* ArduinoFakeContext::Stream(Stream*)’:
C:\Users\joema.platformio\lib\ArduinoFake\src/ArduinoFake.h:57:52: error: ‘dynamic_cast’ not permitted with -fno-rtti
if (dynamic_cast<name##FakeProxy*>(instance)) {
^
C:\Users\joema.platformio\lib\ArduinoFake\src/ArduinoFake.h:96:9: note: in expansion of macro ‘_ArduinoFakeInstanceGetter2’
_ArduinoFakeInstanceGetter2(Stream, Stream)
^

Delete the folder C:\Users\joema\.platformio\lib\ArduinoFake and the try again.

I don’t have it.

I haven’t been able to download Arduino.h anywhere, and that file has apparently gotten into the folder.

I have ESP-IDF, and I want to use it, but I have to learn it all first. Now I need to migrate my abilities from Arduino IDE to PlatformIO, so I have to learn C.

But I want to know how/why WTH???

I have a lot of groovy starter scripts I’m supposed to be advancing.

This sounds like quite a mixup of things:

  • The Arduino framework and the ESP-IDF framework are two separate framework
  • If you go for the ESP-IDF framework, Arduino.h is not needed. If the compiler still asks for it, you are trying to compile Arduino code with ESP-IDF, which cannot work.
  • If you go for the Arduino framework, you do not need to download Arduino.h. PlatformIO will do it if you specify the correct framework.

It seems you have globally installed the ArduinoFake library. This causes additional problems. It’s clearly on you system and you have to delete it as it casues problems.

Go to C:\Users\joema.platformio\lib or C:\Users\joema\.platformio\lib and delete the folder ArduinoFake. The folder .platformio folder might be hidden. So change the Explorer settings to make it visible.

For further assistance, I strongly suggest you post the entire code you want to compile (C/C++ files and also platformio.ini).

Thanks!
I kept deleting ArduinoFake, but it reappeared every time I ran the checker. It was a folder in PlatofmIO /lib.

The framework thing is artifact at this point. I want to learn ESP-IDF, but I have to learn C first.

#Arduino.h is still squiggled, but the code compiled with Success.

Refering to PlatformIO IDE for VSCode — PlatformIO latest documentation, was that Icon number 2 or 6? A normal build shouldn’t trigger ArduinoFake being downloaded, but UnitTests maybe do… o_O?

It was in my PlatformIO /lib folder, not where I was looking.

Thank you