Closed AlexB52 closed 1 year ago
I'm not really familiar with C bindings library.
I tried to run ruby extconf.rb
and these are the logs.
ruby extconf.rb
checking for tgetent() in -ltinfow... no
checking for tgetent() in -ltinfo... no
checking for tgetent() in -ltermcap... yes
checking for ncursesw/curses.h... no
checking for ncurses.h... yes
checking for initscr() in -lncursesw... no
checking for initscr() in -lncurses... yes
header: ncurses.h
library: ncurses
checking for beep()... yes
checking for bkgd()... yes
checking for bkgdset()... yes
checking for curs_set()... yes
checking for deleteln()... yes
checking for doupdate()... yes
checking for flash()... yes
checking for getbkgd()... yes
checking for getnstr()... yes
checking for init()... no
checking for init in ncurses.h... no
checking for isendwin()... yes
checking for keyname()... yes
checking for keypad()... yes
checking for resizeterm()... yes
checking for scrl()... yes
checking for set()... no
checking for set in ncurses.h... no
checking for setscrreg()... yes
checking for ungetch()... yes
checking for addnwstr()... yes
checking for wattroff()... yes
checking for wattron()... yes
checking for wattrset()... yes
checking for wbkgd()... yes
checking for wbkgdset()... yes
checking for wdeleteln()... yes
checking for wgetnstr()... yes
checking for wresize()... yes
checking for wscrl()... yes
checking for wsetscrreg()... yes
checking for werase()... yes
checking for redrawwin()... yes
checking for waddnwstr()... yes
checking for mvderwin()... yes
checking for derwin()... yes
checking for touchwin()... yes
checking for untouchwin()... yes
checking for wtouchln()... yes
checking for is_linetouched()... yes
checking for is_wintouched()... yes
checking for def_prog_mode()... yes
checking for reset_prog_mode()... yes
checking for timeout()... yes
checking for wtimeout()... yes
checking for nodelay()... yes
checking for init_color()... yes
checking for wcolor_set()... yes
checking for use_default_colors()... yes
checking for assume_default_colors()... yes
checking for newpad()... yes
checking for unget_wch()... yes
checking for get_wch()... yes
checking for wget_wch()... yes
checking for PDC_get_key_modifiers()... no
checking for PDC_get_key_modifiers in ncurses.h... no
checking for convertible type of chtype... unsigned int
checking for _XOPEN_SOURCE_EXTENDED... yes
checking for ESCDELAY in ncurses.h... yes
checking for TABSIZE in ncurses.h... yes
checking for COLORS in ncurses.h... yes
checking for COLOR_PAIRS in ncurses.h... yes
checking for function curses_version in ncurses.h... yes
checking for variable curses_version in ncurses.h... no
checking for ncursesw/menu.h... no
checking for ncurses/menu.h... no
checking for curses/menu.h... no
checking for menu.h... yes
checking for new_menu() in -lmenuw... no
checking for new_menu() in -lmenu... no
checking for ncursesw/form.h... no
checking for ncurses/form.h... no
checking for curses/form.h... no
checking for form.h... yes
checking for new_form() in -lformw... no
checking for new_form() in -lform... yes
checking for form_driver_w()... no
checking for sizeof(WINDOW) is available... no
checking for sizeof(MEVENT) is available... yes
checking for sizeof(ITEM) is available... yes
checking for sizeof(MENU) is available... yes
checking for sizeof(FIELD) is available... yes
checking for sizeof(FORM) is available... yes
creating extconf.h
creating Makefile
It seems that ncurses of macOS does not support menu:
https://stackoverflow.com/questions/56622042/clang-on-macos-fails-linking-lmenu-from-ncurses
Could you try installing ncurses by Homebrew?
Thanks @shugo
It took me a while to understand what I had to do but after running the command below sample/menu.rb
now works :+1:
gem install curses -- --use-system-libraries --with-ncurses-dir=/usr/local/opt/ncurses
with /usr/local/opt/ncurses
the path where homebrew installed ncurses on my machine.
I've created a small PR to update the README.md #84
Hi,
I've been trying the different sample code for curses. All of them work except for the
sample/menu.rb
Runningruby sample/menu.rb
gives me this error.I'm on mac OS ventura 13.4.1 and homebrew seems to have ncurses 6.4 already installed.
I can see that there are some issues getting menu from ncurses from MacOS
Is this why there is no documentation on the README for MacOS?
The menu sample works fine when inside the official docker image ruby:3.0
What would it take to get ncurses menu to work?
Thanks for your help