Hi,

I am trying to work with cython. I have the following code:


from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ

cdef ntl_ZZ dummy(ntl_ZZ a, int b):
    return a


If I compile it with sage -b    I get the following error:

building
'sage.rings.polynomial.polynomial_absolute_number_field_dense'
extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -
fPIC -I/opt/SAGE/sage/local//include -I/opt/SAGE/sage/local//include/
csage -I/opt/SAGE/sage/devel//sage/sage/ext -I/opt/SAGE/sage/local/
include/python2.6 -c sage/rings/polynomial/
polynomial_absolute_number_field_dense.c -o build/temp.linux-i686-2.6/
sage/rings/polynomial/polynomial_absolute_number_field_dense.o -w
sage/rings/polynomial/polynomial_absolute_number_field_dense.c:304:
error: field ‘x’ has incomplete type

The relevant line in the code says:

/* Type declarations */

/* "/opt/SAGE/sage-4.3.3/devel/sage-luisfe/sage/libs/ntl/ntl_ZZ.pxd":4
 * include "decl.pxi"
 *
 * cdef class ntl_ZZ:             # <<<<<<<<<<<<<<
 *     cdef ZZ_c x
 *     cdef public int get_as_int(ntl_ZZ self)
 */

struct __pyx_obj_4sage_4libs_3ntl_6ntl_ZZ_ntl_ZZ {
  PyObject_HEAD
  struct __pyx_vtabstruct_4sage_4libs_3ntl_6ntl_ZZ_ntl_ZZ *__pyx_vtab;
  struct ZZ x;
};

I am not sure if this is a bug with cython or a Im doing wrong the
import statementes. Any hint?

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

To unsubscribe from this group, send email to 
sage-support+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to