Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not compile due to ncurses header path #17

Open
yigitsever opened this issue Jun 15, 2020 · 1 comment
Open

Does not compile due to ncurses header path #17

yigitsever opened this issue Jun 15, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@yigitsever
Copy link

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.

@Titor8115
Copy link
Owner

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.

@Titor8115 Titor8115 self-assigned this Jun 15, 2020
@Titor8115 Titor8115 added the bug Something isn't working label Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants