Hello, I'm wondering if anyone can help me out a little here. I have trawl through stack overflow and have no success in finding an answer, so I think I must be doing something in a very odd way and caused myself weird troubles that is not commonly experienced... I just cannot get the dependencies right...
I am trying to write c++11 library for Arduino code. The library code does some calculation on arduino sensor inputs, so it has to do analogueRead and digitalWrite etc - so to say I have to import Arduino.h
Ok, I hope nothing is too odd till now, just point it out if it is. So here is the problem of dependency:
I am using eclipse (for c++ with CDT and AVR plugin) on win7, arduino (1.0.5) and winAVR is also installed and eclipse properties are configured to point at them (following this:
http://playground.arduino.cc/Code/Eclipse).
I tried:
1) compiling (verify) a blink example on Arduino IDE and then searching for the core.a in the temp folder and put it in <project folder>\arduinolib (renaming it libArduinoUno.a); then go to project properties > include > c++ > add the path to the folder contain my .a file; rebuild -> this made no change to the error message "fatal error: Arduino.h: No such file or directory"
2) git cloning the arduino.git repo and import the entire repo into eclipse and then set a c++ library path to <arduino-git-workspace>\hardware\arduino\avr\cores\arduino -> this resulted in Arduino.h path got resolved but then I got "fatal error: avr/pgmspace.h: No such file or directory Arduino.h"
What is the right way to get these library dependencies right in which IDE for a more streamlined experience of library development?
Sorry to ask such a wildcard question... Would be great if any one can shed some light on the problem.
Many thanks.
Merry Christmas and Happy New Year!
Steph