[comp.sys.att] How do you use shared libraries with curses routines?

cram@homxc.UUCP (Marc W. Howard) (01/30/88)

	I'm using Eric Raymond's ccs command (thanx Eric!) to recompile my
programs using shared libraries.  The space savings is phenominal, esp. for
small (~ 20-50 K) programs.  However, I can't get any programs that use
the curses library to link properly.  If the curses library is included
then mucho redefine error messages occur.  If I leave out curses, multiple
missing function errors occur.  In either case, the link editor throws up
its hands in disgust and walks away.
	I assume that there is a way to fashion a local shared library.
But the only documentation for shared libraries that I have is a one page
doc. in section 4 of the UNIX manual (I'm using 3.5 BTW).
	If anyone can shed some light on this, I'd appreciate it.

					Thanx,
-- 
					Marc W. Howard
					AT&T Bell Labs / AT&T Pixel Machines
					Holmdel, NJ 07733
					(201) 949-1214
					...ihnp4!homxc!cram

eric@snark.UUCP (Eric S. Raymond) (02/02/88)

In article <3023@homxc.UUCP>, cram@homxc.UUCP (Marc W. Howard) writes:
>	I'm using Eric Raymond's ccs command (thanx Eric!) to recompile my
>programs using shared libraries.  The space savings is phenominal, esp. for
>small (~ 20-50 K) programs.  However, I can't get any programs that use
>the curses library to link properly.  If the curses library is included
>then mucho redefine error messages occur.  If I leave out curses, multiple
>missing function errors occur.

I ran into this same problem -- it's the reason for the hack in ccs that uses
./shlib.ifile in preference to /lib/shlib/ifile, if the former exists.

What you need to do is make a local copy of /lib/shlib/ifile, and then rip out
the lines giving addresses of names that you get redefined messages for. Then
ccs with -lc.

Someone at AT&T obviously goofed when assembling the 3.5 version of shlib...
-- 
      Eric S. Raymond
      UUCP:  {{seismo,ihnp4,rutgers}!cbmvax,sdcrdcf!burdvax,vu-vlsi}!snark!eric
      Post:  22 South Warren Avenue, Malvern, PA 19355    Phone: (215)-296-5718