[Cython] c++
Brent Pedersen
bpederse at gmail.com
Sat Apr 19 19:19:26 CEST 2008
hi, following the rectangle example here:
http://wiki.cython.org/WrappingCPlusPlus
i'm trying to wrap this:
http://trac.gispython.org/projects/SpatialIndex/browser/spatialindex/trunk/include/SpatialIndex.h#L218
with this:
cdef extern from "spatialindex/SpatialIndex.h":
ctypedef struct c_IStorageManager "SpatialIndex::IStorageManager":
pass
c_IStorageManager *new_Storage
SpatialIndex::StorageManager::createNewMemoryStorageManager"()
cdef class RTree:
cdef c_IStorageManager *storage_ptr
def __cinit__(self):
self.storage_ptr = new_Storage()
i can get a .so but when i import, it gives:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: ./cyrtree.so: undefined symbol:
_ZN12SpatialIndex14StorageManager29createNewMemoryStorageManagerEv
i'm not familiar with c++, am i missing something? can i do this with cython?
also, the library i'm wrapping has lots of virtual methods, and
interfaces, will there be anything different wrapping those?
thanks for any info.
-brent
More information about the Cython-dev
mailing list