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
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to