[Cython] c++

Brent Pedersen bpederse at gmail.com
Sun Apr 20 08:01:35 CEST 2008


hrm. no. i wasn't and of course, it works when i do.
thanks.

On Sat, Apr 19, 2008 at 6:23 PM, Robert Bradshaw
<robertwb at math.washington.edu> wrote:
> Are you linking it with the required library?
>
>
>
>  On Apr 19, 2008, at 10:19 AM, Brent Pedersen wrote:
>  > 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
>  > _______________________________________________
>  > Cython-dev mailing list
>  > Cython-dev at codespeak.net
>  > http://codespeak.net/mailman/listinfo/cython-dev
>
>  _______________________________________________
>  Cython-dev mailing list
>  Cython-dev at codespeak.net
>  http://codespeak.net/mailman/listinfo/cython-dev
>


More information about the Cython-dev mailing list