Today I installed the Arduino IDE version 1.0, then coppied over from the 0023 version the libraries I had that were not included in the 1.0 package. Nice interface, I'm checking it out and opened a sketch that I was working on yesterday (ps2you from the MAKE site). I could not get the sketch to compile. I would get the following error message:
In file included from PS2You.cpp:27:
C:\Documents and Settings\robert.lee1\Desktop\QC Files\arduino-1.0\libraries\MatrixDisplay/MatrixDisplay.h:29:20: error: wiring.h: No such file or directory
The sketch compiles under 0023, so I'm initially rulling that out. The matrixdisplay library folder is mentioned in the error message. There is no wiring.h in the library folder. Should there be? I'm a little confused here. Any assistance or ideas would be greatly appreciated.
What the error message is saying is that your MatrixDisplay library is asking for a file called wiring.h which now no longer exists in the new version. This is going to happen a lot and unless you want to hack the MatrixDisplay or contact the author and get him to fix it there is not much else to be done.
If you want to try and hack the library replace the
Just a guess but it might work.
The sketch compiles under 0023, so I'm initially rulling that out.
Ruling what out?
There were a significant amount of changes in 1.0 so it isn't a surprise that a library not specifically written for it, works.
But most applications and libraries don’t actually have any issues “working”.
Most merely have problems compiling on 1.0 because of the changes that were made in
1.0 that break 100% of all the previously working libraries.
This is what we are seeing in this case.
I would not use the recommend change above of simply
changing the header file include name.
That is merely trading a library that is broken for 1.0 for
a library that is now broken for pre 1.0
I would use this instead:
#if ARDUINO < 100
To ensure that you can easily move back and forth between 1.0
and pre 1.0 environments as you may discover other issues
(like the code under 1.0 is now too big to fit, or the code no longer works correctly)
that may push you back to using the pre 1.0 IDE tools.
Thank you everyone for your replies, very helpful.
I switched the "#include wiring.h", and "#include WProgram.h" occurances in the .ccp and .h files in the library folder with "#include Arduino.h". I had to do the same with the sketch. It is working now. Yea!