[Linux-disciples] Archive libraries and shared objects
Adam Kessel
linux-disciples@bostoncoop.net
Fri, 2 Jan 2004 09:58:56 -0500
--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Dec 30, 2003 at 03:58:59AM -0500, Brian Cooke wrote:
> So I have these files that were produced from a 'make' command that have=
=20
> '.a' extension (ex. libfoo.a). I know there is a way to convert these=20
> .a files into shared objects (libfoo.so) but I can't for the life of me=
=20
> figure out what it is. Anyone know?
A friend suggests just extracting the archive and recompiling. This may
not work if the archive was not originally compiled with -fPIC. So, for
example with libfoo.a:
~> ar x libfoo.a
~> gcc -shared -o libfoo.so libfoo.o
--=20
Adam Kessel
http://bostoncoop.net/adam
--EVF5PPMfhYS0aIcm
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/9YcwdTf3ZklQ6qYRAontAJ9MYwdF4RaoRkEKXupXEVl0sCVKwQCgr4B9
9fD3JIY3XsmLJecVBe5FaAg=
=5VVs
-----END PGP SIGNATURE-----
--EVF5PPMfhYS0aIcm--