Path: utzoo!attcan!uunet!mcsun!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.unix.aix Subject: How do you make a shared library on RISC System/6000 Message-ID: <921@nlsun1.oracle.nl> Date: 26 Jul 90 14:25:25 GMT Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: Oracle Europe, The Netherlands Lines: 26 As known, the libraries /lib/libc.a etc. are shared. How do you create one yourself? If I e.g. have two sources a1.c and a2.c that I want to compile and put into libshr.a, so that they will be shared between more programs linked with libshr.a. I've tried various methods like the ones shown in the ld manual page (in info), but I keep getting errors when trying to execute the program: Could not load program Could not load library libshr.a[a1.o] Error was: Exec format error I need to know: - which ld options (and export files) are needed to make shared object? - are there any special ar options needed to put these into an archive? - which ld (cc) options are needed to link my program with this shared archive? - Do I need to set the LIBPATH environment? Thanks for any help - in particular a working example. -- Bjorn Engsig, Domain: bengsig@oracle.nl, bengsig@oracle.com Path: uunet!mcsun!orcenl!bengsig