SWIG'in python question

Randall Hopper aa8vb at yahoo.com
Wed Jun 2 12:31:27 EDT 1999


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




More information about the Python-list mailing list