On Thu, Sep 23, 2010 at 6:57 AM, Bruce <[email protected]> wrote:
> I have a C++ function I want to call from sage. I have attempted to
> follow the example in
> http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html
>
> This was unsuccessful. The C++ class is not recognised. The problem
> seems to be that this is Cython v0.13 whereas sage 4.5.2 (which I am
> using) and sage 4.5.3 uses Cython v0.12.
>
> If this is correct the options seem to be to use cython v0.12 (in
> which case I don't have documentation) or to upgrade to cython v0.13
> (which I don't know how to do).
>
> Here is how I tried to read in my C++ header file:
>
> cdef extern from "/home/masdbn/planargraph/Graph.hpp" namespace
> PlanarGraph:
>    cdef cppclass Graph:
>        pass
>
> Where do I go from here? Thanks

You have to wrap it the old style way:

http://wiki.cython.org/WrappingCPlusPlus?action=recall&rev=24

Or get someone to review
http://trac.sagemath.org/sage_trac/ticket/9828 so we can get 0.13 into
Sage.

- Robert

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to