[Pythonmac-SIG] dynload_next
Marcel Prastawa
prastawa@cs.unc.edu
Sun, 27 Jan 2002 20:33:51 -0500
Marcel Prastawa wrote:
> Can we build the Python extensions as dynamic libraries instead of
> bundles? I think I saw several NeXT functions that might be useful for
> doing the loads (NSAddImage and company).
Well, it turns out that this is possible. I used NSAddImage() and
NSLoadSymbolFromImage(). I could only build (and load) flat namespace
dynamic libraries though.
When building two-level libraries, certain symbols need to be resolved
by linking to the Python executable (ex: _environ). Bundles have the
-bundle_loader option, there doesn't seem to be anything equivalent to
it for dynamic libraries.
[I wish Apple would lower the restriction for two-level namespaces to
-undefined warning.]
Marcel