I've been playing around with using SWIG to generate python
bindings on the Mac.  Even for the most trivial SWIG/python examples,
I keep coming up against the linker not being able to resolve
the symbol "PyInstance_Lookup".   This is an internal-use
function defined in /Library/Frameworks/Python.framework/Headers/ 
classobject.h:

$ grep PyInstance classobject.h
} PyInstanceObject;
PyAPI_DATA(PyTypeObject) PyClass_Type, PyInstance_Type, PyMethod_Type;
#define PyInstance_Check(op) ((op)->ob_type == &PyInstance_Type)
PyAPI_FUNC(PyObject *) PyInstance_New(PyObject *, PyObject *,
PyAPI_FUNC(PyObject *) PyInstance_NewRaw(PyObject *, PyObject *);
PyAPI_FUNC(PyObject *) _PyInstance_Lookup(PyObject *pinst, PyObject  
*name);

If I search the shared libraries (no surprise) it isn't defined ...

$ nm /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/ 
lib-dynload/*.so | grep PyInstance
          U PyInstance_New
          U PyInstance_NewRaw
          U PyInstance_Type
          U PyInstance_Type

Where else could it be and/or any ideas how to resolve
this issue?  I've asked on the SWIG mailing list but to no
avail.  Is there a trick to getting SWIG running on the Mac?

FYI, I'm using a G4 Powerbook, OS X 10.4.5,

$ which python
/sw/bin/python  (Fink?)

$ python
Python 2.3.3 (#1, Jan  6 2005, 15:03:06)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>>

As always, any help is much appreciated.

Cheers,
Darran.

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to