Arduino and Eigen Library with Windows 10 Problem

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. I simplified the code to the following:

#include  <Eigen320.h>

void setup() {

}

void loop() {

}

Compiling on arduino-1.6.6 yields this error:

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 the library on arduino-1.6.8 with no luck. Same compile error. Your help is appreciated on this matter. I enclosed the Eigen320 library, which should go in …\arduino-1.6.6\libraries

Thank you.

Eigen320.zip (679 KB)

As it turns out, the problem is not limited to <Eigen320.h>.

If I remove that header and just do , I get the same compile error. If I just do , the error persists.

Again, all these worked fine in Windows 7. Any ideas? Thanks.

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)