[Pyrex] Bug and fix: `__pyx_k2p' undeclared here (not in a function)
David McNab
david at rebirthing.co.nz
Wed Jun 23 00:20:53 CEST 2004
Michael P. Dubner wrote:
> Hello,
>
> I've managed to find when and why error "`__pyx_knnnp' undeclared here"
> appears.
> Here is as simple as possible bug demo code:
> ------------
> And here is patch:
Unfortunately, the patch doesn't work for me.
I'm still having to use my hack-o-matic script (attached here), which:
* does a test compile of a pyrex-generated .c file
* parses the errors
* automatically adds the missing '__pyx_knnnp' decs to the c file
If you're using a Makefile-based build, you can change this or similar
rule in your Makefile:
myfile.o: myfile.pyx
pyrexc myfile.pyx
gcc -c $(MY_FAVOURITE_C_FLAGS) myfile.c
to:
myfile.o: myfile.pyx
pyrexc myfile.pyx
python hackpyrexc.py myfile.c
gcc -c $(MY_FAVOURITE_C_FLAGS) myfile.c
This has been working out well for me.
--
Cheers
David
(Attached: hackpyrexc.py)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hackpyrexc.py
Type: text/x-python
Size: 1519 bytes
Desc: not available
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20040623/377e1897/hackpyrexc.py
More information about the Pyrex
mailing list