buttons.h compatibilty issue

Hi all,

I (a newbie in Arduino, 25yrs since I've written my last C++ code) am trying to debug an library conflict or incompatibility error with incuding buttons.h which appars to be a legacy library. I do this while trying to use someone else's code from 2015. I use the latest IDE 1.8.5.

The code is

#include <buttons.h>
#include <MENWIZ.h>

void setup()
{  
 
   pinMode(24, OUTPUT);
   digitalWrite(24, HIGH);
}

void loop()
{  
}

The error is "***\Arduino\libraries\Buttons/buttons.h:25:7: error: redefinition of 'class Button'

class Button {
"
Commenting out MENWIZ allows buttons.h alone to compile fine but removing buttons.h produces a truck load of errors in MENWIZ.h confirming that MENWIZ requires buttons.h to work (which I have read somewhere about as well). The old code that I am trying to revive has been working (supposedly) fine with IDE 1.0.5.

Is there an easy way to figure out why defining "class Button" has become a probem since then?

Thank you folks!

It certainly sounds as if there is a problem with those two libraries. Have a a look through recent posts, within the last week, as I recall there being some discussion about a different menu library. Libraries are written by users such as yourself. The effort that goes into the development of a library is by no means small. The concept that these may need to work alongside others however is often forgotten. Typically, the use of 'common' descriptors tends to conflict with libraries performing similar functions. One option is to edit one of the libraries and change the class name. Without diving into each of the libraries, I can't say much more than that. You have stated that buttons.h is a legacy library, find a newer one.