Ask Your Question

Revision history [back]

On my installation, in a notebook cell:

%cython
cimport sage.rings.number_field.number_field_element_quadratic

yields

[...]code_sage4_spyx_0.c:644:14: error: field ‘__pyx___numerator’ has incomplete type
[...]code_sage4_spyx_0.c:645:13: error: field ‘__pyx___denominator’ has incomplete type
[...]code_sage4_spyx_0.c:1090:13: error: field ‘x’ has incomplete type
[...]code_sage4_spyx_0.c:1356:14: error: field ‘x’ has incomplete type
error: command 'gcc' failed with exit status 1

but adding the magic comment below (see http://wiki.sagemath.org/faq) makes gcc happy:

%cython
#clang c++
cimport sage.rings.number_field.number_field_element_quadratic

On my installation, in a notebook cell:

%cython
cimport sage.rings.number_field.number_field_element_quadratic

yields

[...]code_sage4_spyx_0.c:644:14: error: field ‘__pyx___numerator’ has incomplete type
[...]code_sage4_spyx_0.c:645:13: error: field ‘__pyx___denominator’ has incomplete type
[...]code_sage4_spyx_0.c:1090:13: error: field ‘x’ has incomplete type
[...]code_sage4_spyx_0.c:1356:14: error: field ‘x’ has incomplete type
error: command 'gcc' failed with exit status 1

but adding the magic comment below (see http://wiki.sagemath.org/faq) makes gcc quite happy:

%cython
#clang c++
cimport sage.rings.number_field.number_field_element_quadratic