Missing bits/c++config.h file

I am trying to compile my blink_demo sketch and upload it to my DOIT ESP32 DEVKIT V1 module. I never make it past compile.

As part of the compile error messages shown below, reference is made to "programdata\matlab\supportpackages\r2017b". I have uninstalled and removed all MATLAB programs and files from my PC, but this sketch still will not compile.

Does someone out there have a simple, straightforward fix, with simple steps to follow, to solve this problem? I have tried to fix this problem myself and have reached no solution.

" In file included from c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\algorithm:60:0,"

             "from C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\arduinoide.instrset\idepkgs\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Arduino.h:142,"

             "from C:\Users\JERRYR~1\AppData\Local\Temp\arduino_build_100322\sketch\blink_demo.ino.cpp:1:"

"c:\programdata\matlab\supportpackages\r2017b\3p.instrset\arduinoide.instrset\idepkgs\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\utility:68:28: fatal error: bits/c++config.h: No such file or directory"

compilation terminated.

exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

Please post the full sketch that produces the error

Here is the sketch.

blink_demo.ino (600 Bytes)

A more useful way to post your code

//  Blink Demo

// ledPin refers to ESP32 GPIO 23

const int ledPin = 23;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin ledPin as an output.
  pinMode(ledPin, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(ledPin, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                  // wait for a second

It appears that the compiler is trying to locate your arduino.h file from some MATLAB directory rather than the typical C:\Program Files (x86)\Arduino... location

This file you posted gives a compilation error, because it has an extra "}" at the end.
That could be your problem.

Hi @grenken. Please check this forum thread for information and a link to a solution:

It seems this error is caused by whatever modifications the MATLAB thing does to the Arduino IDE.

No, removing the extra "}" did not solve the problem here. My problem is deeper than that.

I have been aware of the related MATLAB directory issue causing compilation failure. That's why I uninstalled all MATLAB files, and MATLAB folders on my PC.

I haven't figured out how to tell the compiler to ignore looking into other folders for the c++ file.

Thank you for working this problem.

I was able to compile this sketch. I solved this problem by finding the offending Setup statement in the Preferences Text file associated with this sketch: "settings.path=C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\arduinoide.instrset\idepkgs"

I commented the statement out. Now the sketch compiles.