[Top][All Lists]

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

Re: header file for cchar_t?

From: Thomas Dickey
Subject: Re: header file for cchar_t?
Date: Fri, 8 Jul 2011 04:12:09 -0400 (EDT)

On Fri, 8 Jul 2011, Clemens Ladisch wrote:

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’ 

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

right.  _XOPEN_SOURCE itself is (across various platforms) usually defined
in an untidy mess that is intertwined with other symbols. But _XOPEN_SOURCE_EXTENDED is something that you usually have to add yourself.

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]