WProgram.h: No such file or directory

WProgram.h: No such file or directory

Postby kwo » Sun Dec 04, 2011 3:41 pm

Hi,

I downloaded the DigitShield zip file and installed the library in my main Arduino libraries folder. When I open the "SetDirectExample" and compile, I receive the following error:

In file included from SetDirectExample.cpp:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:18:22: error: WProgram.h: No such file or directory
In file included from SetDirectExample.cpp:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:24: error: expected `)' before 'clock'
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:29: error: 'boolean' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:30: error: 'boolean' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:32: error: 'boolean' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:36: error: 'byte' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:39: error: 'boolean' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:42: error: 'boolean' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:43: error: 'boolean' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:48: error: 'boolean' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/DigitShield/DigitShield.h:49: error: 'boolean' does not name a type

I am using Arduino 1.0 on OSX. Would greatly appreciate any help? Thanks!

Karl
kwo
Newbie
Newbie
 
Posts: 2
Joined: Sun Dec 04, 2011 3:36 pm

Re: WProgram.h: No such file or directory

Postby Michael » Sun Dec 04, 2011 9:43 pm

Yeah, Arduino 1.0 basically breaks most libraries. I'll be publishing all new libraries for my products this week, but in the mean time, you can simply change the include in DigitShield.h from this:

Code: Select all
#include "WProgram.h"
#include <pins_arduino.h>


to this:

Code: Select all
#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
  #include <pins_arduino.h>
#endif
Michael
Administrator
Administrator
 
Posts: 458
Joined: Sat May 29, 2010 8:24 am

Re: WProgram.h: No such file or directory

Postby kwo » Mon Dec 05, 2011 5:09 am

Excellent. I made the change and now everything compiles without errors. Thanks!
kwo
Newbie
Newbie
 
Posts: 2
Joined: Sun Dec 04, 2011 3:36 pm

Re: WProgram.h: No such file or directory

Postby Michael » Sun Dec 18, 2011 9:33 pm

FYI, I've updated all the libraries for Arduino 1.0...
Michael
Administrator
Administrator
 
Posts: 458
Joined: Sat May 29, 2010 8:24 am


Return to Bugs/Problems

Who is online

Users browsing this forum: No registered users and 0 guests