[geos-devel] Using SWIG to interface with GEOS, undefined symbols
sgillies at frii.com
Mon Jul 12 10:41:07 EDT 2004
Yesterday I began to try to use SWIG to generate a Python
GEOS module using the CVS GEOS. To start, I am only wrapping
the classes in geom.h and precision.h.
SWIG 1.3.20 generates wrapper code with only a few warnings
and the module does build, resulting in geos.py and a very
large _geos.so (I have statically linked against libgeos.a).
On import of the geos module, an import error is raised:
undefined symbol: _ZN4geos14PrecisionModel19maximumPreciseValueE
I think there is a problem not just with this symbol but with others.
If I comment out the reference to the above in the GEOS wrapper and
rebuild, I get an ImportError with a different undefined symbol.
The symbols *are* in libgeos.a, and I'm certain that I've properly
I'm making sure to use g++ for the linker, avoiding one of the most
common SWIG C++ module pitfalls.
Anyone else taken a swing at a GEOS module with SWIG and run into
sgillies at frii dot com
More information about the geos-devel