Arduino IDE Okay in Windows 7, Fails in Windows 10

My project involving the Eigen library for matrix math compiled normally on the arduino-1.6.6 IDE and previous ones back to 1.5.2, until I upgraded from Windows 7 64-bit to Windows 10 64-bit. This simplified code reproduces the compile error:

#include  <Eigen320.h>

void setup() {

}

void loop() {

}

The compile error is shown below, which is related to cstdio. I get this same error if I just call or just , so this error is independent of the Eigen library. Unfortunately, Eigen calls so I'm stuck.

In file included from c:\users\mc\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\random:39:0,

                 from c:\users\mc\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\bits\stl_algo.h:65,

                 from c:\users\mc\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\algorithm:62,

                 from C:\Programs\arduino-1.6.6\libraries\Eigen320/Eigen\Core:148,

                 from C:\Programs\arduino-1.6.6\libraries\Eigen320/Eigen320.h:35,

                 from D:\$projects\mcu\arduino\test\test.ino:2:

c:\users\mc\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\cstdio:122:11: error: '::printf' has not been declared

   using ::printf;

           ^

exit status 1
Error compiling.

I tried this on the latest 1.6.8 IDE for Windows 10, but same error. Also went back to 1.6.5 with no luck. On Windows 7, all works correctly. Any ideas? Appreciate your help.

I tracked down the compile error to the file. The following simple code reproduces the error in Windows 10.

#include <cstdio>

void setup() {
}

void loop() {
}

This is the reported error:

c:\users\mc\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1\arm-none-eabi\include\c++\4.8.3\cstdio:123:11: error: '::printf' has not been declared

   using ::printf; 

           ^

test:4: error: 'namespacestd' does not name a type

 void setup() {

 ^

exit status 1
'namespacestd' does not name a type

I enclosed the "cstdio" file that causes the compile error.

And I did find a workaround. Save a backup of "cstdio", open "cstdio", and comment out line 76. The modification should look like this:

//#undef printf

This repairs the compile error for those trying to use or any other library that uses . Hopefully the Arduino team can implement a more permanent solution.

cstdio.zip (1.58 KB)