‘mvwin_wchnstr’ was not declared in this scope when compiling lnav

lnav is a great log file viewer. To use its latest features, we need to fetch the source code and compile manually.
When compiling lnav using make, following error is appeared

I have installed all requirements stated in documentation.

Solution

The lnav documentation only said ncurses library is needed, but not mention which version.
My current installed ncurses library is libncurses5-dev. Changing to libncursesw5-dev fixed this issue.

(This command is for apt package manager, please change to corresponding command according to the package manager you use.)