Just started with Arduino and bumped into a problem. I installed a library with no success. I also tried the test-library with bad results. I get this error message:
My Arduino App 1.0.1:
In file included from sketch_sep19a.cpp:1:
/Users/jom/Documents/Arduino/libraries/Test/Test.h:11:24: error: WConstants.h: No such file or directory
What am I doing wrong with this libraries?
All help, ideas, links and suggestions are welcome!
Othervise my Arduino is working just great! I did, compiled and run some selfmade programs. It's great.
I have a Mac, OSX 10.5.8 and use Arduino 1.0.1 application, and it's an Arduino Uno R3.
Test.h
But could not open/manipulate these. I renamed Test.cpp -> Test.ino and then I managed to open it with my Arduino 1.0.1 application. Should I do like this? And then save and rename it back to Test.cpp?
Heh hee, sorry about these questions. Thanks in advance!
Now I have my next problem.
It helped a bit to do the changes mentioned above but now I get this:
My Arduino App Says:
core.a(main.cpp.o): In function main': /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:11: undefined reference to setup'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/main.cpp:14: undefined reference to `loop'
That library seems to be written for Arduino 0023.
Also, you said you renamed Test.cpp in Test.ino. That won't work. The .ino extension is "reserved" for sketches, i.e. programs which contain setup() and loop() functions. A library must not contain those two functions. Hence renaming a library .cpp file to .ino is not going to work.
It would be easier to provide help if you'd post the entire sketch, Test.h and Test.cpp you're trying to compile.
Okay, now I think I know what the problem is (that's me, hah haa).
I tried to open the library from Sketch > Import Library > ... and that's what I did wrong. The right is just open it from File > Examples > ...
I did like this (and this is wrong):
I should do like this, and this works:
Thank you all for your support!
Be ready, I have soon some more questions XD