Dynamic loading for SunOS 4.1.3

Jose M. Pereira (pereira@qual.inesc.pt)
Thu, 19 May 94 03:06:04 +0200

>>>>> "Bill" == Bill Janssen <janssen@parc.xerox.com> writes:

Bill> Is there any documentation about how to 1) Configure in dynamic
Bill> loading when building python 1.0.2 for SunOS 4.1.3?

It's configured by default (or do you mean shared libraries...?).

Bill> 2) How to build/load a dynamic module?

To load:
import mymodule
To build:
Here's a little makefile I have (tested w/GNUmake).
Note that "lifemodule" loads a foreign .a that uses X11: assumes libX11 is
linked into python; otherwise, I would add -lX11 to the end od the last line
# you can drop -dc -dp...
# CPPFLAGS,CFLAGS are used by GNUmake defaults
#(I use gcc-2.5.8)

CPPFLAGS= -I /home/jmp/Python/python-1.0.2/Include -I /home/jmp/Life1.0/Source/
LDFLAGS.so= -dc -dp -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.5.8
SRCS=cryptmodule.c lifemodule.c lispmodule.c newmodule.c lifemodule.so

%.so: %.o ; $(LD) $(LDFLAGS.so) -o $@ $^ -lgcc

all: $(SRCS:.c=.so)

lifemodule.so: lifemodule.o /home/jmp/Life1.0/Source/c_life.a