Help with Arduino Dependency problem

43 views
Skip to first unread message

st...@citizeninventor.com

unread,
Dec 23, 2014, 4:50:10 PM12/23/14
to lond...@googlegroups.com
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

Christian Bianchini

unread,
Dec 23, 2014, 5:34:43 PM12/23/14
to lond...@googlegroups.com
I a not 100% sure but you might look at this website: http://arduino.land/FAQ/content/2/49/en/can-c11-be-used-with-arduino.html

I never heard c++11 with Arduino but sounds fun :)

Probably you might look how to make a library as Adafruit do, I dont think you should use c++11 except there are real reason.

I hope I gave you some help.

Good luck
Reply all
Reply to author
Forward
0 new messages