Mail Archives: djgpp/2010/03/29/12:39:11
> From: RayeR <glaux AT centrum DOT cz>
> Date: Mon, 29 Mar 2010 09:53:30 -0700 (PDT)
> Bytes: 2494
>
> > You can _use_, i.e., _call_ the same function from many places. But
> > ncurses does not _call_ getch etc., it _implements_ them.
>
> OK understand. And why ncurses cannot use this functions from conio
> (libc.a)
Probably because they need to use the same infrastructure as other
ncurses functions, e.g. so that the cursor position could be tracked.
> or name them differently?
The names are expected by programs that link against ncurses.
> I tried to play with linking order and found that if I link libc first
> I got any error and it compiles OK.
> [object files] -lc -lreadline -lncurses
> And it seems to work for both parts using getch and readline.
> Which implementation of getch was used?
The one from ncurses, I think. GNU ld is a one-pass linker, so it
will not load the functions from libc until it sees some other
function that calls them.
- Raw text -