[SciPy-User] ‘NPY_DOUBLE’ undeclared

Hjalmar Turesson hturesson@gmail....
Tue Oct 18 06:12:59 CDT 2011


Hi,

When attempting to compile C extensions, I get the following type of errors:


error: ‘NPY_DOUBLE’ undeclared(first use in this function)
error: ‘NPY_LONG’ undeclared (first use in this function)
error: ‘NPY_UINT32’ undeclared (first use in this function)

It seems I've forgot to include some header defining NPY_*, but both
"Python.h" and "Numeric/arrayobject.h" are included. And the compiler
doesn't complain about not finding these headers. I get the same error when
trying to compile the example from the SciPy Cookbook (
http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays#head-7b1bc91e01b2ea0714315c69f5c8c56b1280f0c0
).

Is there some additional header I need to include? Or did I screw up
something else?

Google is not very informative in about this matter (which suggests that I
made a trivial error).

I'm using gcc version 4.6.1 on Ubuntu, with Numpy 1.5.1

Thanks,
Hjalmar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111018/9be48623/attachment.html 


More information about the SciPy-User mailing list