I’ve been using ncurses for a project. I’m using wide characters so i found functions to display those in ncurses: mvwaddwstr
and mvwaddnwstr
. But when I compile my program it gives warning: warning: implicit declaration of function ‘mvwaddnwstr’; did you mean ‘mvwaddnstr’? [-Wimplicit-function-declaration]
and similar warning for mvwaddwstr
also. Although the program compiles and runs successfully so i’ve been ignoring this for long time.
What bugs me is that, if i’m including header files (ncurses.h
) of a lib then it must provide declaration to all functions that it provides. And I think that ncurses fails to do so for said functions and my compiler ignores that and still tries to call those functions using linked lib.
Am I right or missing something like another header should be included for ncurses (ncursesw.h isn’t present on my system) ? Any explanation or documentation regarding this behaviour is appreciated.
OS: Linux endeavour 6.8.8-arch1-1
Compiler: gcc version 13.2.1 20240417 (GCC)
Compiler Flags: -Wall -lncursesw
Ncurses: ncurses 6.4_20230520-2 and lib32-ncurses 6.4_20230520-1
Header: ncurses.h
Functions: mvwaddnwst and mvwaddwstr
(I’ve also tried on a mint vm with ncursesw-dev and ncursesw lib installed)
I’ve tried different system on vm with different os and respective libs. But it produces the same warnings.