Subject: [Boost-build] gcc, -fPIC and including static libraries in a shared library build
From: Jim Hague (jim.hague_at_[hidden])
Date: 2014-11-14 10:35:41
I'm trying to build a Python extension that provides access to some facilities
used by an application. These facilities are currently packaged as static
libraries and linked into the app executable.
But I find I can't use the static libraries in the extension, because that's a
shared library, and so requires (target is amd64) the code in the static
libraries to be built with -fPIC, which currently it isn't.
As far as I can see, there's no way to flag code in a static library as
potentially shared. I don't want to convert all the static libs to shared in
the app. So I think my only option is to add -fPIC to CFLAGS.
Have I missed any cunning better method?
-- Jim Hague - jim.hague_at_[hidden] Never trust a computer you can't lift.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk