Go Down

Topic: Matrix lib won't compile (v0010) (Read 472 times) previous topic - next topic

roypardi

Hi~

I tried to use the Matrix example in v 0010 and get the error: "Matrix" type not defined - this is on OSX 10.4.10 using arduino NG. Also tried the Sprite example from the same lib and got the same error.

I've used this lib before with the Wiring board and the code looks exactly the same.

Also tried it with v 009 and got the same error. Is this something with my setup or?

tx,

--Roy

wayoda

#1
Nov 03, 2007, 03:21 pm Last Edit: Nov 03, 2007, 03:22 pm by wayoda Reason: 1
Hi,

you have to put two #include-statements at the top of the hello_matrix sketch. I don't know why they are missing (not only in your environment, everywhere).

Put the statements at the top of the sketch before the Matrix-library is used for the first time in your code:
Code: [Select]

//At the top of the hello_matrix sketch
#include "Matrix.h"
#include "Sprite.h"

//now the rest of the demo code
Matrix myMatrix = Matrix(0, 2, 1);
....
....

Eberhard

roypardi

awesome - thanks! (I think Wiring handles libs differently as I don't recall needing to use the #includes)

this forum/community/project/*wildcard is so great!

tx

--Roy

Go Up