'HAVE_MENU unset when compiling ncurses for Ruby curses extension on Mac?
I'm trying to use Ruby's curses library wrapper, but getting a uninitialized constant Curses::Item (NameError) error when trying to make a menu or items, despite the class being documented and used in a sample program (I get the same error when I run the sample).
Looking at the source, it looks like it'll only create these classes if HAVE_MENU is #define-ed while compiling the C extension (source). How can I ensure this is set when compiling? It looks related to extconf.rb but I'm having trouble pinning down how it works.
FWIW, I'm on Mac OS 12.3 (Monterey), have CLI tools installed, and get a man page when I man ncurses (for version 5.7) and man menu (same version). I also ran brew install ncurses which appears to have installed a newer version, but given this version doesn't appear in man pages I suspect it's not getting picked up by the compiler when building the Ruby gem.
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
