bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conflicting types on OSX


From: Bryan Christ
Subject: Re: Conflicting types on OSX
Date: Thu, 30 May 2019 09:54:05 -0500

Correct on your assumptions.  The build system is CMake and until I manually installed ncurses from source, it was not finding ncurses.  Basically the CMake find_package() module for ncurses scours a bunch of common locations looking for the lib and include and then tests for certain symbols to determine if it has wide support.  What it finds (or the lack thereof) determines how / which include paths are supplied to the compiler.

On a semi-related note... as I port to other systems (FreeBSD, OSX, and even other Linux distros), it's bizarre that there doesn't seem to be any consistency as to where the OS provider deploys ncurses.  It seems to be a point of frustration for the CMake guys as well.

On Thu, May 30, 2019 at 4:25 AM Thomas Dickey <address@hidden> wrote:
On Wed, May 29, 2019 at 03:32:47PM -0500, Bryan Christ wrote:
> Admittedly a bit of a fish when it comes to OSX.  I've got a Mojave system
> that I'm trying to port my application to.  I just installed ncurses from
> source (stable 6.1).
>
> The compile of ncurses is as follows:
>
> ./configure --prefix=/usr/local --without-cxx --without-ada
> > --without-curses-h --with-shared --without-debug --enable-widec
> > --enable-const --enable-ext-colors --enable-sigwinch --enable-wgetch-events
> > make
> > sudo make install
>
>
> That all seems to go well.
>
> I'm including ncurses in this manner:
>
> #if defined(__APPLE__) && defined(__MACH__)
> > #include <ncursesw/ncurses.h>
> > #endif
...

presumably you have

        /usr/local/include/ncurses/curses.h
        /usr/local/include/ncurses/ncurses.h
        /usr/local/include/ncurses/term.h
        /usr/local/include/ncurses/unctrl.h

It seems that the compiler isn't doing an implicit

        -I/usr/local/include

Some of the systems which have "ports" (FreeBSD for instance) use a different
default include path.  But you can add one...

--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net


--
Bryan
<><

reply via email to

[Prev in Thread] Current Thread [Next in Thread]