Pages: [1]   Go Down
Author Topic: Broken Menu example  (Read 629 times)
0 Members and 1 Guest are viewing this topic.
Nova Scotia
Offline Offline
Full Member
***
Karma: 4
Posts: 203
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12179
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#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.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: