Failure to compile "unknown OSError exception code 22"

  1. .h is wrong for a file that is supposed to be compiled, use .cpp instead
  2. Do not overwrite the main() function when using the Arduino framework, it expects you to implement void setup() and void loop() instead, per example

The last person that had such problems here Espressif32 compiler problem - #20 by adriano63 said that this was being caused by RAV Antivirus. Any intrusive antivirus software installed?