C++/Python version problems?

Chris Liechti cliechti at gmx.net
Wed Jul 31 17:02:09 EDT 2002


David Smith <nospam at nonesuch.com> wrote in
news:3D484ACD.7030503 at nonesuch.com: 
> I'm running Python 2.2.1 under Linux, and successfully interfaced my
> C++ procedures into Python.  Then I got more aggressive with the
> templates, and g++2.95 wouldn't compile it.  So I got g++ 3.0, and it
> compiles -- I used distutils/setup.py to make the shared object file. 
> But, now when I try to import my module, I get the error message:
> 
>     ImportError: ./cfuncs.so: undefined symbol: __gxx_personality_v0
> 
> Does this maybe have to do with Python being compiled under an older
> g++, or being linked with an older library?  Any suggestions as to
> what I should do? 

i'm probably the wrong one to answert this, but...
i think the naming conventions have chaged from g++2.9x to 3.x. the name 
manglig for C++ methods/functions is diffrent. there might be some option 
to enfore the old behaviour.
python is written is C anyway, so you should not have any problems with it, 
but maybe you're using an interface library like Boost or CXX. that one 
should(must?) be compiled with the same compiler as your extension.

so, yes i do think you thoughts were right, have a look at the libraries 
you link with.

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list