[PYTHONMAC-SIG] Mac SWIG & dynamic loading MacPython modules

Jack Jansen Jack.Jansen@cwi.nl
Thu, 29 May 1997 11:41:05 +0200

> Has anyone gotten MacSWIG to work with dynamically loaded Python
> modules ?  I keep getting link problems with the global "__file" 
> variable, which I assume, should not be exported from PythonCorePPC,
> but should be part of the main program address space.

It should definitely be exported from PythonCorePPC, otherwise you can't use 
stdio in your extension. The trick is that you should put PythonCorePPC 
*before* the C library in your link sequence, so that the __file symbol (and 
any other shared global data) is resolved from PythonCorePPC.

This is documented somewhere, but the fact that I can't find it right now 
suggests that it might be stated a bit more clearly:-)
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@cwi.nl      | ++++ if you agree copy these lines to your sig ++++
http://www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 

PYTHONMAC-SIG  - SIG on Python for the Apple Macintosh

send messages to: pythonmac-sig@python.org
administrivia to: pythonmac-sig-request@python.org