c++pythoncboostboost-python

How to compile static library with -fPIC from boost.python


By default, libboostpython.a is compiled without -fPIC. But I have to make a python extension and it is a dynamic library with -fPIC that links to static libraries. How can I compile a static library (libboostpython.a) with -fPIC from boost.python?


Solution

  • There are a couple options you could use: