[Pythonmac-SIG] Debugging Extensions on Mac

Bob Ippolito bob at redivi.com
Wed Sep 6 22:31:31 CEST 2006


On 9/6/06, Gustavo Tabares <gustabares at verizon.net> wrote:
> Hello all,
>
> Sorry if this isn't the right forum for this, but I have been searching
> Google for a couple days without finding any close answers.
>
> I am trying to debug Python extensions on the Mac. I am already able to
> compile/link both debug and release versions of my extension using both
> Xcode and distutils. The extension fully works in Release mode. I copied
> down the source for Python-2.4.3 and made a debug version of the Python
> interpreter.
>
> The problem comes when I try to import the debug version of my extension
> in the debug Python interpreter. I get the following:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: Failure linking new module: extension.so: Symbol not found:
> _Py_InitModule4
>   Referenced from: extension.so
>   Expected in: dynamic lookup

Try building the extension with the debug interpreter.

-bob


More information about the Pythonmac-SIG mailing list