linking one extension module to another (Mac OSX)

pianomaestro at pianomaestro at
Tue Nov 22 09:52:39 CET 2005

Martin v. Löwis wrote:
> Simon Burton wrote:
> > I'm having some trouble linking one extension module to another because
> > the linker expects a "lib" prefix and my python modules cannot have
> > this prefix.
> This is a Good Thing (tm) :-) Don't link extension modules to each
> other; this is really asking for trouble. Instead, come up with a
> function pointer API in one module, put that into a CObject, and
> access the CObject through import statements.
> Alternatively, make both extension modules link to the same
> backend library.
> Regards,
> Martin

I have C Extension classes distributed across several modules with
non-trivial interdependancies. I guess you are saying I should have
these in backend libraries and then put the module specific functions
in the module itself. It's going to be tricky because I am using
distutils and pyrex to do all this. Maybe Greg (Ewing) has some other

Thanks for the warning.


More information about the Python-list mailing list