Go Down

Topic: LedControl library problem (Read 4597 times) previous topic - next topic

andreszb

Hi, I get the following errors when compiling

In file included from sketch_apr10a.cpp:1:
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:24:24: error: WConstants.h: No such file or directory
In file included from sketch_apr10a.cpp:1:
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:30: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:52: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:54: error: 'byte' does not name a type
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:64: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:64: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:131: error: 'boolean' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:142: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:153: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:164: error: 'byte' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:164: error: 'boolean' has not been declared
/Users/andreszb/Documents/Arduino/libraries/LedControl/LedControl.h:179: error: 'boolean' has not been declared

I get a notification that dismisses itself very quickly at startup I can't read.

The code is:

#include <LedControl.h>

void setup(){}

void loop(){}

Anyone know what's going wrong? I could compile successfully until I replaced the files in the library for the exact same files plus the keywords.txt file.

Wazzled

#1
Apr 11, 2012, 02:00 am Last Edit: Apr 11, 2012, 02:06 am by Wazzled Reason: 1
I took a quick look at the library, well libraries since there are two LedControl libraries.  The first one compiled straight away but the second modified one gave the errors you mentioned.

Did you update to the Arduino 1.0 IDE?

If you didn't update the IDE are you sure your using the same one as before and not accidently swapped it for the modified one?

If you updated the IDE and are sure its the correct LedControl library try opening LedControl.h and replace #include "WConstants.h" with #include "Arduino.h" and also open LedControl.cpp and replace #include "WProgram.h" with #include "Arduino.h"

andreszb

Thanks! Easy fix, It now works fine.  :)

spuder

I ran into this same problem after updating from arduino 022 to 1.0.3. I made the suggested change with no joy. Re-downloading the library worked for me.

AliJimbo

Hi,

I have the exact same problem as the OP, and none of the suggested fixes have worked. Is it a problem with the library installation?

AliJimbo

Please ignore/delete the above post. I fixed it by correctly editing the library as Wazzled suggested.

sensai

I would also like to give my thanks, I was having the same issue... and google guided me right to here.

Go Up