itsanjan / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Using 1.0-rc1, WConstants.h / wiring.h missing #682

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On the Windows version of Arduino 1.0-rc1, any libraries such as EL_Escudo, 
that references WConstants.h (which references wiring.h) will fail to compile.

Both WConstants.h and wiring.h are not found under 
"hardware\arduino\cores\arduino" in Arduino 1.0-rc1.

I was able to get libraries to work by including "wiring.c" directly. But, I am 
not sure of the implications of that.

Here is an example library referencing WConstants.h (line 13):

https://github.com/ryowens84/EL-Escudo/blob/master/EL_Escudo.cpp

Changing line 13 to the following allows the sketch to compile:
#include "wiring.c"

Original issue reported on code.google.com by hscharler@gmail.com on 21 Oct 2011 at 5:46

GoogleCodeExporter commented 9 years ago
Both WConstants.h and wiring.h are also not included in the Mac version of 
Arduino 1.0-rc2.

Furthermore, the example sketch from OneWire library, which references to 
WConstants.h, fails also to  compile.
However, the above solution with including a reference to "wiring" does not 
help. Moreover, old WConstants.h and wiring.h files from Arduino 0022 also do 
not allow to compile the sketch.  

Original comment by pskor...@gmail.com on 28 Oct 2011 at 7:03

GoogleCodeExporter commented 9 years ago
Under 1.0 and later, you're meant to use Arduino.h rather than WConstants.h. 
This is known to break compatibility with old libraries.

Original comment by picxp...@hotmail.com on 28 Oct 2011 at 8:27

GoogleCodeExporter commented 9 years ago
Yeah, these were removed intentionally.  You can use Arduino.h instead.

Original comment by dmel...@gmail.com on 29 Oct 2011 at 9:50

GoogleCodeExporter commented 9 years ago
I got this to work... Any instance of "WConstants.h" or "wiring.h" needs to be 
replaced with "Arduino.h".

Thanks.

Original comment by hscharler@gmail.com on 29 Oct 2011 at 10:00

GoogleCodeExporter commented 9 years ago
I'm using LCD4884 library in one of my projects, and I had this issue.
At first, the compiling error was that "WConstants.h" didn't exist. I replaced 
"WConstants.h" with "Arduino.h" and now I have about 15-20 compiling errors, 
mostly pertaining to conflicting lines.
Any ideas?
Thanks!

Original comment by 15mccl...@isd578.org on 1 Apr 2013 at 3:07