Does not compile due to ncurses header path
I've cloned the 1.0.0 release (congrats!) and make gives me the following;
In file included from src/mandown.c:14:
include/view.h:12:10: fatal error: ncursesw/ncurses.h: No such file or directory
12 | #include <ncursesw/ncurses.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/mandown.o] Error 1
I'm on Manjaro, uname -s is Linux
I've found this, basically says you should use ncurses.h.
adding;
ifeq ($(UNAME_S),Linux)
CURSES := ncurses
OSFLAGS :=
DEFINE := -D HAS_NCURSES_H
endif
to the Makefile fixes the problem, make correctly produces mandown and mdn executibles.
Thanks for the support!😊
The linked post is very interesting. Additionally it seems like ArchLinux doesn’t differentiate Ncurses and Ncursesw.
What I had read from Ncurses page is that some distributors like HomeBrew (now + ArchLinux) basically merges or symlinks Ncurses/Ncursesw together.
I was using Ncursesw/ncurses.h for the possibility of wide-character support in the future, which is not supported by -lncurses
Current version will definitely compiled under ncurses/ncurses.h. But I’m not sure if changing Makefile to simply assuming all Linux distributions have -lncursesw as default library for ncurses.h is a good idea.
I’m think about doing an .am/.in for checking against the two libraries. Should be the best solution here.