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



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/17/2011 05:10 PM, Thomas Dickey wrote:

> You're seeing implicit for get_wch, since there's no _XOPEN_SOURCE_EXTENDED
> in the compile line.  

Okay, after checking:

bear@janus:~/src/xxh$ make display.o
gcc -D_XOPEN_SOURCE_EXTENDED -Wall -Werror -lncursesw -c -o display.o \
display.c
bear@janus:~/src/xxh$

using the compile line to specify the option (in this case in addition
to #define _XOPEN_SOURCE_EXTENDED at the beginning of the file) bypasses
the problem.

These two methods of establishing a compile option are supposed to be
equivalent according to gcc's online docs, but here we have a case where
specifying the option on the compile line seems to make the functions
linkable even with -Wall and -Werror, while specifying it by #define at
the start of the file instead exposes a bug where -Wall or -Werror
prevent linking.

This is a clearly superior workaround, since it leaves the functionality
of -Wall and -Werror intact.  But this is still a bug;
these things are supposed to be equivalent, and neither is supposed
to be affected by these "unrelated" build options.

				Bear
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOI8X/AAoJEAOzWkqOibfNmhYH/1ZYHNQJZtgq6aVzn0hGeAhC
P4RAB+rgyL2FzQGM37+BCUS81dXVhneQvakifQyWurzR0lpIG1mVpc//lUecXuqq
wah90qEGypKVoJpJxvyTnL2l8ZAWzmSCq+J+XOXbwgmDfOatqTUGCuU/R2yJFYPR
hZp7+LmPeHqqI8bn/5v5HRGqMFDAI9c6+2cvVEIEDhSxw9KjbSO0/Y3iL73JhZLd
EMGNgsoCokWa08fizVTri8DBh/dvakVTlK7e31fGz961E5QG+b2R469agoedYO/m
16OxHjrPqFWRX6N9WGlkbGChdxPGbSH2fR5A4nerGHtqm7EEYSPszSJ3brd8Dg4=
=uYOE
-----END PGP SIGNATURE-----



Reply to: