[net.micro.att] Shared libraries on the UNIX pc woes

chute@hscfvax.UUCP (850154@M.Zalkalns) (12/30/85)

Ok folks, the non-programmer has struck again.  I have been trying to
include shared library routines in a large exectable by adding the following
lines (copied from /usr/include/Makepre.h) in my Makefile (S4 is shell
defined):

LIB	= $(S4)/lib
SHAREDLIB= $(LIB)/crt0s.o $(LIB)/shlib.ifile

The next line specifies the usuall libraries:

LIBS = -lm -lcurses -ltermlib -lplot

and then I bring together 162 object files (in ALLOBJS) with the following
ld:

	ld -o mdash $(ALLOBJS) $(SHAREDLIB) $(LIBS)

I get a few warnings such as the following:

mld shlib.ifile 30 warning: symbol ospeed from file //usr/lib/libcurses.a being redefined

but also get the dreaded undefined symbol bombout (included verbatum):

undefined		first referenced
 symbol  		    in file
_doprnt             		//usr/lib/libcurses.a
mld fatal: Symbol referencing errors. No output written to mdash

Question:  Have I violated fundamental rules of shared libraries?  I sure
don't understand them, I'm operating at the level of copying Makefiles I've
seen before.

Incidently, this is under Version 3 of System V for the UNIX pc.

Bravely trying to bring up the mdash package for the UNIX pc community, I
remain humbly yours,

Chris Chute MD
Department of Epidemiology
Harvard School of Public Health
677 Huntington Ave
Boston, MA 02115

617-732-1050
...harvard!hscfvax!chute OR
...harvard!hscfvax!chutepc!chute