[SciPy-User] ‘NPY_DOUBLE’ undeclared

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


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 (

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

-------------- 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