Arduino 1.8.3 with MATLAB 2016a and 2016b bits/c++config.h not found

So this is a combination problem and solution. I scoured the forums, google, etc, looking for the fix, and ended up finding the fix on my own.

Anyway, the original symptom looked like a common #include <bits/c++config.h> include path file not found issue. Like in this thread:

The include path pointed to some of my MATLAB stuff and the related support packages.

I spent some time uninstalling an un-needed version of matlab 2016a, and continued to see the compile error. (failed compile, never getting to upload).

The final step was digging for where include paths and preferences were stored in preferences.txt.

I found build_properties_custom.settings.path=C:\ProgramData\MATLAB\SupportPackages\R2016b\3P.instrset\arduinoide.instrset\arduinosam-1.6.7


After commenting them out, and restarting the IDE, the compile and upload worked successfully with the Blink example.


Could you please explain the last parts in detail. I did not understand how did you comment them out, and comment out what? I spent some time to solve the same problem, I am using Arduino 1.8.5 and MatlabR2017a, but still, the same problem existed. I will be appreciated if you may help me. The error is like below;

In file included from c:\programdata\matlab\supportpackages\r2017a\3p.instrset\arduinoide.instrset\idepkgs\packages\stm32\tools\arm-none-eabi-gcc\6-2017-q2-update\arm-none-eabi\include\c++\6.3.1\stdlib.h:36:0,

from C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.3.0\cores\arduino/wiring.h:24,

from C:\ProgramData\MATLAB\SupportPackages\R2017a\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.3.0\cores\arduino/Arduino.h:32,

from sketch\Blink.ino.cpp:1:

c:\programdata\matlab\supportpackages\r2017a\3p.instrset\arduinoide.instrset\idepkgs\packages\stm32\tools\arm-none-eabi-gcc\6-2017-q2-update\arm-none-eabi\include\c++\6.3.1\cstdlib:41:28: fatal error: bits/c++config.h: No such file or directory

#include <bits/c++config.h>


compilation terminated.

exit status 1
Error compiling for board Nucleo-64.

I had this problem, and I have just solved it by going to C:\Users\Zaid\AppData\Local

then search for the folder arduino or arduino15

Uninstall the IDE then remove this folder, matlab changes the configuration of the IDE somewhere in this folder so it starts reading the boards from somewhere else,, after deleting the folder Arduino or arduino15 or both you can reinstall the arduino IDE and reconfigure the esp boards from boards manager after adding the jason extension from preferences as before and it will work