OS X 10.13.2 (high sierra).
I'm trying to write simple curses program with widechar support, but it appears, that default (pre-installed library) curses doesn't support widechar:
Simplest program example (from here):
#include <ncursesw/ncurses.h>
#include <locale.h>
#include <wchar.h>
int main() {
setlocale(LC_ALL, "");
initscr();
wchar_t wstr[] = { 9474, L'\0' };
mvaddwstr(0, 0, wstr);
refresh();
getch();
endwin();
return 0;
}
doesn't compile, gives error:
test.cpp:1:10: fatal error: 'ncursesw/ncurses.h' file not found
Tried to find in manual pages:
man addwstr says:
#include <curses.h>
int addwstr(const wchar_t *wstr);
int addnwstr(const wchar_t *wstr, int n);
int waddwstr(WINDOW *win, const wchar_t *wstr);
int waddnwstr(WINDOW *win, const wchar_t *wstr, int n);
int mvaddwstr(int y, int x, const wchar_t *wstr);
int mvaddnwstr(int y, int x, const wchar_t *wstr, int n);
int mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *wstr);
int mvwaddnwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n);
As man page says, tried to include "curses.h" instead of "ncursesw/ncurses.h". Again compile error:
test.cpp:9:5: error: use of undeclared identifier 'mvaddwstr'; did you mean 'mvaddstr'?
Tried to find any widechar-related curses header in /usr/include. No result. Any suggestions?