[Pythonmac-SIG] python SWIG problem ...
Bob Ippolito
bob at redivi.com
Sun Mar 26 22:21:18 CEST 2006
On Mar 26, 2006, at 10:11 AM, Darran Edmundson wrote:
>
> 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
--
> If I search the shared libraries (no surprise) it isn't defined ...
>
> $ nm /Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/
--
> 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?)
You're using a Fink Python here, but you're looking at the shared
library and headers for the Apple distribution of Python.... you need
to be looking at /sw/include for the header and /sw/lib for the
shared lib, or you need to stop using Fink's Python. You're probably
using a SWIG that was built for one of them, but using it against the
library/headers of the other.
-bob
More information about the Pythonmac-SIG
mailing list