Hello Mailinglist! i'm using cygwin together with perl 5.14 and the Curses::UI perl module. It uses the ncursesw library bundled with cygwin.
Installing the Curses::UI worked well using cpan, but using the ncurses functions like getyx() from the demo-script bundled with the curses module crahes perl with the error-message: Curses function 'getyx' is not defined in your Curses library at demo line 59. Looking into /usr/include/ncursesw/cursesw.h shows that this macro is defined. Even building the Curses module for perl by hand, reveals that there is something wrong with the ncurses library: ~/Curses-1.28 $ export CURSES_LDFLAGS="-L/usr/lib/ncurses -lncurses" ~/Curses-1.28 $ export CURSES_CFLAGS="-I/usr/include/ncurses" ~/Curses-1.28 $ perl Makefile.PL GEN function: not applicable PANELS functions: not enabled MENUS functions: not enabled FORMS functions: not enabled Writing Makefile for Curses Writing MYMETA.yml ~/Curses-1.28 $ perl test.syms -v PANELS MENUS FORMS Checking capabilities of the Ncurses libraries. Set CURSES_VERBOSE environment variable to see the details of the tests. Doing test compiles with the compile command 'gcc-4 -DSYM="_C_SYM_" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o _C_FILE_ _C_FILE_.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses' gcc-4 -DSYM="waddch(stdscr,0)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses (rc = 0) function 'waddch' found gcc-4 -DSYM="wechochar(stdscr,0)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses (rc = 0) function 'wechochar' found ... gcc-4 -DSYM="getyx(stdscr,LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testsym.c: In function <91>main<92>: testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment (rc = 256) function 'getyx' NOT found gcc-4 -DSYM="getparyx(stdscr,LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testsym.c: In function <91>main<92>: testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment (rc = 256) function 'getparyx' NOT found gcc-4 -DSYM="getbegyx(stdscr,LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testsym.c: In function <91>main<92>: testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment (rc = 256) function 'getbegyx' NOT found gcc-4 -DSYM="getmaxyx(stdscr,LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testsym.c: In function <91>main<92>: testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment (rc = 256) function 'getmaxyx' NOT found ... gcc-4 -DSYM="getsyx(LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym testsym.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testsym.c: In function <91>main<92>: testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment testsym.c:4:3: error: lvalue required as left operand of assignment (rc = 256) function 'getsyx' NOT found gcc-4 -DSYM="getsyx(LINES,LINES)" -I/usr/include/ncurses -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testint testint.c -L/usr/local/lib -L/usr/lib/ncurses -lncurses testint.c: In function <91>main<92>: testint.c:6:9: error: expected expression before <91>do<92> (rc = 256) ... I tested this on two different OS (Win7 and XP) with the latest version of cygwins libncursesw. Is the macro missing in the library itself? What could i do to make it working? Kind regards, David Schueler -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple