shlib and curses on unix pc

Mike "Ford" Ditto ford at elgar.UUCP
Sat Jun 25 10:22:36 AEST 1988


In article <559 at rphroy.UUCP> tkacik at rphroy.UUCP (Tom Tkacik) writes:
>Has anyone managed to compile a program that uses curses,
>with the shared library.  I tried it and it does not seem to work.

Who ever said it would?

>The command I used was 
>$ ld /lib/crt0s.o /lib/shlib.ifile *.o -lcurses
>
>First, I got many messages stating that curses had redefined symbols.
>These, I suspect, are also defined in the shared library.
>Though, if I leave off the -lcurses, there are a lot of undefined
>symbols.

This has been covered before, but I'll summarize again:

The Unix PC shared library includes TAM (the Terminal Access Method),
*NOT* Curses.  This fact, along with a complete description of TAM, is
given in the Unix Utilities documentation.  Tam is a curses-like
package with a bunch of windowing enhancements, and subset of the
curses functions provided to ease porting of curses programs.

If you want the shared library, use Tam.  If you have a curses
program, and it uses curses functions that are not also in Tam, don't
use the shared library.

Some people have used a few simple curses functions from -lcurses in a
Tam program linked with the shared-library.  The functions that I
remember being used were functions like cbreak(), noecho(), and nonl(),
which are not closely interdependent with the rest of curses (they
just manipulate the stty modes.)  This is by no means supported or
reliable.

Basically, the shared library is equivalent to the following ld
options: -ltam -ltermlib -lc.  The same rules apply to shlib as apply
to normal libraries: You can link in any combination of libraries as
long as they do not have global symbols with names that conflict with
other.  Curses and Tam can not be linked into the same program because
they have functions with identical names that do different things.

					-=] Ford [=-

"Once there were parking lots,		(In Real Life:  Mike Ditto)
now it's a peaceful oasis.		ford at kenobi.cts.com
This was a Pizza Hut,			...!sdcsvax!crash!kenobi!ford
now it's all covered with daisies." -- Talking Heads



More information about the Unix-pc.general mailing list