[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linking with curses
From: |
Thomas Dickey |
Subject: |
Re: linking with curses |
Date: |
Sat, 17 Nov 2007 16:11:38 -0500 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
On Sat, Nov 17, 2007 at 08:17:32AM +0300, Michail Vidiassov wrote:
> Dear Thomas,
>
> On Sat, 1 Sep 2007, Thomas Dickey wrote:
>
>>> How would the ideal world without workarounds for other workarounds for
>>> ancient bugs look like?
>>
>> #include <curses.h>
>>
>> -lcurses
>>
>> (but the non-ideal world has different implementations and versions of
>> curses)
>
> In that view, may be "must" is a too strong word in the following
> quote from ncurses(3)
well, the organization of the manpage may be a problem (since there
are many things to discuss...). The -lncursesw part is discussed
under "ALTERNATE CONFIGURATIONS" (which is pointed at the end
of this paragraph):
A program using these routines must be linked with the -lncurses
option, or (if it has been generated) with the debugging library
-lncurses_g. (Your system integrator may also have installed these
libraries under the names -lcurses and -lcurses_g.) The ncurses_g
library generates trace logs (in a file called 'trace' in the current
directory) that describe curses actions. See also the section on
ALTERNATE CONFIGURATIONS.
Your quote does not appear to have that - I added that in 2006/02/05, so
it's in ncurses 5.6, but not 5.5.
> A program using these routines must be linked with the -lncurses
> option, or (if it has been generated) with the debugging library
> -lncurses_g. (Your system integrator may also have installed these
> libraries under the names -lcurses and -lcurses_g.)
>
> Nowdays when ncurses is more likely to be the only library in the system
> than not, -lncurses instead -lcurses just leads away from the one true path
> of "The Single UNIX Specification" :)
In the case where ncurses is the only such library, it would be nice to
assume that it's also symlinked so that -lcurses works.
(sometime when I complete my threading example, we'll have 3 flavors to
get confused by ;-)
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature