okbob / ncurses-st-menu

ncurses (pdcurses) based library for CUA look menu
BSD 2-Clause "Simplified" License
62 stars 9 forks source link

got errors building on termux #14

Open cargilcm opened 4 days ago

cargilcm commented 4 days ago

Hello, I've not found any project like yours where there are sub menus in a character cell display(ncurses codebase). I've run into some problems compiling and wondered if you might help me

To compile I ran: gcc -I./include ~/ncurses-st-menu/ncmenu.c where nmenu.c consist of the contents under "usage" and got:

Error#1

error: incompatible pointer to integer conversion initializing 'char' with an expression of type 'ST_MENU_ITEM[2]' (aka 'struct st_ST_MENU_ITEM[2]') [-Wint-conversion]

Line 76 | {"~F~ile", 61, NULL, 0, _file},

The compiler indicates __file variable for the call complained about above.

And

Error#2

error: call to undeclared function 'st_menu_set_desktop_panel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Line 134 | st_menu_set_desktop_panel(mainpanel);

Thanks very much for your project which even nicely adds screenshots; thanks in advance for your help.

okbob commented 4 days ago

looks so your code is missing st_menu.h include file.

st_menu_set_desktop_panel is wrong. Correct name is st_menu_set_desktop_window.

Can you compile demo applications from demo directory?

just

./configure
make
cargilcm commented 3 days ago

Great question/tip/reiterating what was previously explained. There's something peculiar about the termux autoconf related to ar-lib.

I can't build in termux by default. But when I drop into a proot-distro that emulates a proper alpine Linux distro inside of termux I can build and run the demos!

Being that the complaint is: configure: error: cannot find required auxiliary files: ar-lib I know I prob need to let the termux developers know but I'm case you're curious I also found this post which.. Could shed some light?! Can't compile with ar-lib I just don't know enough about autoconf/c language to know if this is helpful.

I note specifically where the user states something may be linked to the old ncurses library. Let me know if you have witnessed anything like this before or can point me to the right direction please. Thank you Mr.Stehule

okbob commented 3 days ago

pá 18. 10. 2024 v 15:05 odesílatel Chris Cargile @.***> napsal:

Great question/tip/reiterating what was previously explained. There's something peculiar about the termux autoconf related to ar-lib.

I can't build in termux by default. But when I drop into a proot-distro that emulates a proper alpine Linux distro inside of termux I can build and run the demos!

Being that the complaint is: configure: error: cannot find required auxiliary files: ar-lib I know I prob need to let the termux developers know but I'm case you're curious I also found this post which.. Could shed some light?! Can't compile with ar-lib https://bbs.archlinux.org/viewtopic.php?pid=1572137#p1572137 I just don't know enough about autoconf/c language to know if this is helpful.

I note specifically where the user states something may be linked to the old ncurses library. Let me know if you have witnessed anything like this before or can point me to the right direction please. Thank you Mr.Stehule

I am sorry, this is first time so I can see the name "ar-lib"

I found https://bugs.gentoo.org/775968

there was some issue in Automake - fixed

3676 2020-11-14 Jim Meyering @.**> 3677 3678 tests: avoid failures due to missing ar-lib 3679 3680 t/ar4.sh: Create dummy ar-lib, as done in other tests, 3681 to avoid failure like this: 3682 configure: error: cannot find required auxiliary files: ar-lib 3683 * t/ar5.sh: Likewise.

ncurses-st-menu has just one prerequisite - ncurses or pdcurses library (and clib).

Reply to this email directly, view it on GitHub https://github.com/okbob/ncurses-st-menu/issues/14#issuecomment-2422434566, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEFO434X23ZXNRZEPDEJBDZ4EBSVAVCNFSM6AAAAABQDMOVOKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRSGQZTINJWGY . You are receiving this because you commented.Message ID: @.***>