Pages: [1]   Go Down
Author Topic: Matrix lib won't compile (v0010)  (Read 357 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 295
Got Karma?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Wuppertal/Germany
Offline Offline
God Member
*****
Karma: 1
Posts: 895
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
//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
« Last Edit: November 03, 2007, 09:22:56 am by wayoda » Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 295
Got Karma?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: