Linking an Interpreter dynamically
Klaus Alexander Seistrup
kas at maps.magnetic-ink.dk
Mon Jun 21 04:47:25 EDT 1999
Lloyd Weehuizen wrote:
> I was just wondering if it is possible to create a dynamically linkable
> python interpreter? I've looked in the docs, but can't seem to find
> anything, and "make sharedinstall" doesn't seem to give me any linkable
> libraries??
So what you want is a shared python library? If so, I managed to do it
sometime back, although in a kludgy manner:
First I made sure that Python was compiled using gcc's -fPIC flag and then
I manually made a shared library out of the resulting libpython1.5.a using
the --whole-archive option along with whatever it takes to make a shared
library with gcc (-shared -Wl,-soname,...), and I ended up with a shared
libpython.so.1.5.x that I installed manually.
Sorry for the clumsy description but it's quite a while since I made the
experiment (which succeeded, I ended up with a python executable less than
3 kbytes in size dynamically linked to the shared python library).
Hope this helps you a bit...
//Klaus
--
···[ Magnetic Ink ]·························································
···[ http://www.magnetic-ink.dk/ ]··········································
More information about the Python-list
mailing list