Either make it a proper Sage extension module (and specify c++ in module_list.py) or use a makefile to call Cython with the appropriate command line arguments (e.g. https://github.com/vbraun/lattice_phi4)
On Sunday, December 14, 2014 2:46:34 PM UTC+1, Jernej Azarija wrote: > > Hm... > > So what is the current workaround if I want to use cython on a C++ wrapper? > > On Saturday, 13 December 2014 19:31:07 UTC+1, Volker Braun wrote: >> >> This is http://trac.sagemath.org/ticket/15217 >> >> >> On Saturday, December 13, 2014 6:20:22 PM UTC+1, Jernej Azarija wrote: >>> >>> Hello! >>> >>> I am trying to wrap up a C++ library using Cython and I am having a >>> problem running the *.pyx file. Specifically I have the following Cython >>> program: >>> >>> ============= >>> # distutils: language = c++ >>> # clang C++ >>> >>> cdef extern from "graph.hh": >>> cdef cppclass Graph: >>> Graph(int) >>> >>> def foo(): >>> cdef Graph *p = new Graph(10) >>> ============= >>> >>> and when I try to load it within Sage with %runfile it says >>> >>> ============= >>> Error compiling Cython file: >>> ------------------------------------------------------------ >>> ... >>> cdef extern from "graph.hh": >>> cdef cppclass Graph: >>> Graph(int) >>> >>> def foo(): >>> cdef Graph *p = new Graph(10) >>> ^ >>> ------------------------------------------------------------ >>> >>> la.pyx:9:24: Operation only allowed in c++ >>> =============== >>> >>> Anyone happens what am I missing here? >>> >>> Best, >>> >>> Jernej >>> >> -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.