[Pyrex] exception string constants have non-static linkage
Phil Frost
indigo at bitglue.com
Sun Jun 20 05:51:39 CEST 2004
I have a project where I'm linking a single binary with several
pyrex-generated modules. It seems 'static' is missing on the exception
strings in the generated C code, because when i do something like:
raise Exception( "deviceContext must not be None" )
in one module, and in another:
raise Exception( "unable to get DriverFuncs for driver" )
I get multiple definitions of __pyx_k6 at link time. Looking at the
generated code, i see:
char (__pyx_k6[]) = "deviceContext must not be None";
and in the other file:
char (__pyx_k6[]) = "unable to get DriverFuncs for driver";
changing "char" to "static char" fixes the problem. If this is indeed a
bug, I'm hoping someone familiar with the pyrex source can fix it
easilly.
This terrible ;) problem aside, pyrex has been working wonderfully. To
the pyrex developers: great work! The best programs are those that make
programs.
More information about the Pyrex
mailing list