Felix Natter wrote:
When trying to compile:
------------
#include <wchar.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <locale.h>
#include <ncursesw/curses.h>
...
with ncursesw 5.9 I get:
gcc -Wall -O0 -g -lncursesw -o t testUTF8-3.c
testUTF8-3.c: In function ‘main’:
testUTF8-3.c:30:3: warning: implicit declaration of function ‘addwstr’
[-Wimplicit-function-declaration]
<http://pubs.opengroup.org/onlinepubs/007908799/xcurses/implement.html> says:
| Applications should ensure that the feature test macro _XOPEN_SOURCE
| is defined before inclusion of any header. [...] An application that
| uses any API specified as ENHANCED CURSES or relies on any portion of
| this specification marked with the EC margin legend must define
| _XOPEN_SOURCE_EXTENDED = 1 in each source file or as part of its
| compilation environment. When _XOPEN_SOURCE_EXTENDED = 1 is defined in
| a source file, it must appear before any header is included.