Go Down

Topic: Broken Menu example (Read 693 times) previous topic - next topic

0miker0

I was wondering why the Menu example is broken for 1.0.3 at http://playground.arduino.cc/Code/Menu? I have installed the library accoring to the instructions and restarted the program. When I verify the code I get the following errors:


In file included from SerialMenu.pde:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:33:22: error: WProgram.h: No such file or directory
In file included from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:34,
                 from SerialMenu.pde:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/interfaces/MenuInterface.h:41: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/interfaces/MenuInterface.h:47: error: 'byte' has not been declared
In file included from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:35,
                 from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/MenuItem.h:35,
                 from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:36,
                 from SerialMenu.pde:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/interfaces/SubMenuInterface.h:43: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/interfaces/SubMenuInterface.h:48: error: 'byte' has not been declared
In file included from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/MenuItem.h:35,
                 from /Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:36,
                 from SerialMenu.pde:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:46: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:51: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:53: error: 'byte' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:54: error: 'byte' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/SubMenu.h:55: error: 'byte' does not name a type
In file included from SerialMenu.pde:1:
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:51: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:59: error: 'byte' has not been declared
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:62: error: 'byte' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:63: error: 'byte' does not name a type
/Applications/Arduino.app/Contents/Resources/Java/libraries/Menu/Menu.h:64: error: 'byte' does not name a type

MarkT

If WProgram.h is mentioned as in that set of errors it means the library has not been updated for Arduino 1.0 and later.
References to WProgram.h should be replaced by Arduino.h, or conditionally like this:
Code: [Select]
#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
#endif


As the contact details are on that page I'd suggest contacting the author and suggesting
it be updated.
[ I won't respond to messages, use the forum please ]

Go Up