[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#634200: #634200 gcc -Wall -Werror -lncurses fails to link wide-character ncursesw functions.



On 07/17/2011 05:10 PM, Thomas Dickey wrote:
> fwiw, I routinely build with warnings enabled (and don't have a use for
> -Werror).
> 
> For the rest - I'm typically seeing only extra warnings that
> you wouldn't see with -Wall (such as const mismatches, which are
> problematic).
> 
> That's for ncurses itself, plus lynx and dialog.
> 
> curses.h isn't including <wctype.h>, since none of its declarations need it.
> That's iswgraph and iswspace.
> 
> You're seeing implicit for get_wch, since there's no _XOPEN_SOURCE_EXTENDED
> in the compile line.  Quoting from man ncurses


Wait, the compile line?  I took the documentation you quote for ncurses
below....

>             You must also define _XOPEN_SOURCE_EXTENDED when compiling for the
>             wide-character library to use the extended (wide-character)  func-
>             tions.   

.... to mean #define _X_OPEN_SOURCE_EXTENDED in the c file before
including headers, as shown in the head of the c file I submitted
with the bug report. That seems to work for me to make these functions
visible - provided I do NOT use --Wall or --Werror.  If it's only
possible to define it on the command line, isn't that a bug too?

I'll check and see if I can use --Wall or --Werror with the ncursesw
library if I include _X_OPEN_SOURCE_EXTENDED on the gcc command line
instead of (or in addition to) in the file.  But it still  can't be
correct behavior for these compile options to have an effect on what
functions are visible/linkable.

					Bear



Reply to: