Converting from .a to .so
Richard Dawe
rich at phekda.gotadsl.co.uk
Sat Dec 30 16:45:43 UTC 2006
David Woodhouse wrote:
> On Sun, 2006-12-24 at 14:52 -0900, Jeff Spaleta wrote:
>> On 12/24/06, Paul <paul at all-the-johnsons.co.uk> wrote:
>>> Okay, for future reference, is there a way to do what I need to do
>>> (convert from .a to .so)?
>> Don't you just need to pass -shared to the compiler?
>
> You need to make sure you build shared libraries with -fPIC too.
I always find the section in the Program-Library-HOWTO (from the Linux
Document Project) quite helpful:
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN95
The HOWTO is a bit out of date if you're a C++ programmer. It doesn't
cover symbol visibility <http://gcc.gnu.org/wiki/Visibility>, for example.
--
Richard Dawe [ http://homepages.nildram.co.uk/~phekda/richdawe/ ]
"You just amass stuff while you are alive. It's like stuff washed up
on a beach somewhere, and that somewhere is you." -- Damien Hirst
More information about the fedora-extras-list
mailing list