I copied and pasted all of the code supplied by this library link but am still getting problems compiling the code:
http://playground.arduino.cc/Code/MatrixMath
I am using the Arduino Mega 2560
TROUBLESHOOTING TAKEN
- read this thread regarding MatrixMath: Matrix Math Library - Problem compiling even the example - Programming Questions - Arduino Forum
- Changed ' Wprogram.h to Arduino.h ' with no success comiling.
- Changed the code back to its original form.
STEPS I HAVE TAKEN WHILE INSTALLING THE LIBRARY
- started by copying each section of code into notepad files.
- When saving each notepad file I choose the 'save type file as' to be 'all'.
- All text files were saved into a folder named "Matrix Math".
'file name' saved as: 'Name' in MatrixMath folder: 'type' in MatrixMath folder:
MatrixMath.ino MatrixMath Arduino file
MatrixMath.cpp MatrixMath Header file
MatrixMath.h MatrixMath C++ souce file
Then I moved the folder into the appropriate Arduino library folder so that I could access "MatrixMath" in arduino by clicking the following:
file --> examples --> MatrixMath
Then I verify the code and get this error as follows:
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Copy(float*, int, int, float*)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:31: multiple definition of `MatrixMath::Copy(float*, int, int, float*)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:31: first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Multiply(float*, float*, int, int, int, float*)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:43: multiple definition of `MatrixMath::Multiply(float*, float*, int, int, int, float*)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:43: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Add(float*, float*, int, int, float*)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:63: multiple definition of `MatrixMath::Add(float*, float*, int, int, float*)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:63: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Subtract(float*, float*, int, int, float*)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:78: multiple definition of `MatrixMath::Subtract(float*, float*, int, int, float*)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:78: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Transpose(float*, int, int, float*)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:93: multiple definition of `MatrixMath::Transpose(float*, int, int, float*)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:93: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Scale(float*, int, int, float)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:105: multiple definition of `MatrixMath::Scale(float*, int, int, float)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:105: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Invert(float*, int)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:120: multiple definition of `MatrixMath::Invert(float*, int)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:120: first defined here
MatrixMath\MatrixMath.cpp.o: In function `MatrixMath::Print(float*, int, int, String)':
C:\Program Files (x86)\Arduino\libraries\MatrixMath/MatrixMath.cpp:17: multiple definition of `MatrixMath::Print(float*, int, int, String)'
MatrixMath.cpp.o:C:\Users\MATPC~1\AppData\Local\Temp\build5070405843853062295.tmp/MatrixMath.cpp:17: first defined here
MatrixMath\MatrixMath.cpp.o:(.bss.Matrix+0x0): multiple definition of `Matrix'
MatrixMath.cpp.o:(.bss.Matrix+0x0): first defined here
core.a(main.cpp.o): In function `main':
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:40: undefined reference to `setup'
C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino/main.cpp:43: undefined reference to `loop'
Yes I am a noob! So, any help would be greatly appreciated as this problem is a little over my head.
Thanks in advance.