perl 5.14 ncursesw: calling getbegyx() crashes

René Berber r.berber@computer.org
Mon Apr 8 21:01:00 GMT 2013


On 4/8/2013 1:23 PM, "D. SchÃŒler" wrote:

[snip]
> ~/Curses-1.28 $ gcc-4 -I/usr/include/ncursesw -L/usr/lib/ncursesw
> -lncursesw -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -g
> -fno-strict-aliasing -pipe -fstack-protector -DUSEIMPORTLIB -o testsym
> testsym.c
> /tmp/ccp3WxB0.o: In function `main':
> /home/axnrl/Curses-1.28/testsym.c:5: undefined reference to `_initscr'
> /home/axnrl/Curses-1.28/testsym.c:6: undefined reference to `_ncwrap_stdscr'
> /home/axnrl/Curses-1.28/testsym.c:6: undefined reference to `_getcury'
> /home/axnrl/Curses-1.28/testsym.c:6: undefined reference to `_ncwrap_stdscr'
> /home/axnrl/Curses-1.28/testsym.c:6: undefined reference to `_getcurx'
> collect2: ld returned 1 exit status
>
> This looks like a linker error, which could not find the symbols for the
> functions.

No, its the way the linker works in Windows: the order of the operands 
affects the product, i.e. put the library at the end and it works, put 
depending libraries in order (the linker does a one-pass, so required 
symbols have to appear before the library that has them).
-- 
René Berber


--
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



More information about the Cygwin mailing list