I installed the MatrixMath library according to the instructions, but the example "mmExample" does not compile when the board is set to "Arduino Due (Programming Port".
When I change the board to "Arduino/Genuino Mega or Mega 2560" it does compile without errors...
I found this thread, but it did not work for me:
http://forum.arduino.cc/index.php/topic,143602.msg1081267.html#msg1081267
Here the compilation log I'm getting when trying to compile the example...
Arduino: 1.6.8 (Windows 7), Board: "Arduino Due (Programming Port)"
In file included from C:\Users\moennich\Documents\Arduino\libraries\MatrixMath\examples\mmExample\mmExample.ino:2:0:
C:\Users\moennich\Documents\Arduino\libraries\MatrixMath/MatrixMath.h:30:19: error: 'MatrixMath Matrix' redeclared as different kind of symbol
extern MatrixMath Matrix;
^
In file included from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h:282:0,
from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/sam3xa/include/sam3xa.h:44,
from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/sam3.h:59,
from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/sam.h:198,
from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/libsam/chip.h:25,
from C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\cores\arduino/Arduino.h:42,
from sketch\mmExample.ino.cpp:1:
C:\Users\moennich\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.7\system/CMSIS/Device/ATMEL/sam3xa/include/component/component_matrix.h:71:3: error: previous declaration of 'typedef struct Matrix Matrix'
} Matrix;
^
C:\Users\moennich\Documents\Arduino\libraries\MatrixMath\examples\mmExample\mmExample.ino: In function 'void loop()':
mmExample:39: error: expected unqualified-id before '.' token
Matrix.Multiply((float*)A,(float*)B,N,N,N,(float*)C);
^
mmExample:42: error: expected unqualified-id before '.' token
Matrix.Print((float*)A,N,N,"A");
^
mmExample:44: error: expected unqualified-id before '.' token
Matrix.Print((float*)B,N,N,"B");
^
mmExample:45: error: expected unqualified-id before '.' token
Matrix.Print((float*)C,N,N,"C");
^
mmExample:46: error: expected unqualified-id before '.' token
Matrix.Print((float*)v,N,1,"v");
^
mmExample:48: error: expected unqualified-id before '.' token
Matrix.Add((float*) B, (float*) C, N, N, (float*) C);
^
mmExample:50: error: expected unqualified-id before '.' token
Matrix.Print((float*)C,N,N,"C");
^
mmExample:51: error: expected unqualified-id before '.' token
Matrix.Print((float*)B,N,N,"B");
^
mmExample:53: error: expected unqualified-id before '.' token
Matrix.Copy((float*)A,N,N,(float*)B);
^
mmExample:55: error: expected unqualified-id before '.' token
Matrix.Print((float*)B,N,N,"B");
^
mmExample:57: error: expected unqualified-id before '.' token
Matrix.Invert((float*)A,N);
^
mmExample:59: error: expected unqualified-id before '.' token
Matrix.Print((float*)A,N,N,"A");
^
mmExample:61: error: expected unqualified-id before '.' token
Matrix.Multiply((float*)A,(float*)B,N,N,N,(float*)C);
^
mmExample:63: error: expected unqualified-id before '.' token
Matrix.Print((float*)C,N,N,"C");
^
mmExample:68: error: expected unqualified-id before '.' token
Matrix.Multiply((float*)C,(float*)v,N,N,1,(float*)w);
^
mmExample:70: error: expected unqualified-id before '.' token
Matrix.Print((float*)v,N,1,"v");
^
mmExample:71: error: expected unqualified-id before '.' token
Matrix.Print((float*)w,N,1,"w");
^
exit status 1
expected unqualified-id before '.' token