PS: Really sage.misc.cython.cython() should be rewritten to be python using 
subprocess.check_call / check_output and not shellscript snippets run via 
os.system. I'll leave that as an exercise ;-)



On Saturday, December 13, 2014 7:31:07 PM 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.

Reply via email to