Open PL/I can be used to create sharable libraries on any of the following operating systems:
To produce code that can be included in a sharable library, other than on AIX, you must ask Open PL/I to produce position-independent code by using the -pic option. The -pic option is not required for AIX, because all Open PL/I code on AIX is position-independent. Once you have object files generated as position-independent code, you link them into a sharable library using the commands listed below. You also need to link in dllmain.o.
ld -G -o NEWSHARE.so newshare.o x1.o x2.o x3.o $MFPLI_PRODUCT_DIR/lib/dllmain.o $MFPLI_PRODUCT_DIR/lib/noofm.o $MFPLI_PRODUCT_DIR/lib/nojw.o -lmf -L$MFPLI_PRODUCT_DIR/lib
ld -o NEWSHARE.so newshare.o x1.o x2.o x3.o -bE:newshare.exp -bM:SRE -brtl $MFPLI_PRODUCT_DIR/lib/dllmain.o $MFPLI_PRODUCT_DIR/lib/noofm.o $MFPLI_PRODUCT_DIR/lib/nojw.o -lmfnso -L$MFPLI_PRODUCT_DIR/lib
You need to add MFOPENPLIINIT and MFOPENPLITERM to the export file
ld -shared -o NEWSHARE.so newshare.o x1.o x2.o x3.o $MFPLI_PRODUCT_DIR/lib/dllmain.o $MFPLI_PRODUCT_DIR/lib/noofm.o $MFPLI_PRODUCT_DIR/lib/nojw.o -melf_i386 -lmf -L$MFPLI_PRODUCT_DIR/lib