SWIG'in python question

JB jimbag at kw.igs.net
Wed Jun 2 12:44:01 EDT 1999

Randall Hopper wrote:
> JB:
>  |I've got a .so that I built with swig for python. Everything builds fine
>  |but when I import i get this message from python "_mymod.so: undefined
>  |symbol: __eh_pc". I wondered if anyone had seen this before and could
>  |give me a clue. I think I'm missing a library somewhere. I'm building on
>  |RedHat 5.2.
> Does your code in _mymod.so depend on any user code another .o/.so?
> I'll assume not.  That being the case, it's probably a symbol defined in
> some system library.  Use "nm" to find out which one, then add a "-l"
> reference to it on the link line (the command line where you create
> _mymod.so).
> Check your man page for nm for the right options to print the filename and
> the symbol on one line.  For example:
>     (FreeBSD:)   nm -o  /usr/lib/*.so* | grep <mysymbol>
>     (IRIX:)      nm -Bo /usr/lib/*.so* | grep <mysymbol>
>     (Solaris:)   nm -Rh /usr/lib/*.so* | grep <mysymbol>
> Randall

It turned out to be in libstdc++. I didn't know about nm tho. Thanks for
that tip.


More information about the Python-list mailing list