Fwd: [Numpy-discussion] Numpy does not compile with PY_ARRAY_TYPES_PREFIX

Sasha ndarray at mac.com
Fri Jan 27 13:32:32 CST 2006


On 1/27/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:

> Show an example of using it in a file before you include the numpy
> header.  Because that *should* work.  I know, I just tested it a few
> days ago...

I've tried to put just two lines in "test.c":

#define PY_ARRAY_TYPES_PREFIX XYZ_
#include <numpy/arrayobject.h>

and compile it with

$ gcc -I$NUMPYINCLUDE -c test.c

Where NUMPYINCLUDE points to the location of numpy/arrayobject.h

I get the following errors:
In file included from test.c:2:
numpy-0.9.4/lib/python2.3/site-packages/numpy/core/include/numpy/arrayobject.h:699:
error: syntax error before " XYZ_intp"
numpy-0.9.4/lib/python2.3/site-packages/numpy/core/include/numpy/arrayobject.h:699:
warning: data definition has  no type or storage class
numpy-0.9.4/lib/python2.3/site-packages/numpy/core/include/numpy/arrayobject.h:700:
error: syntax error before " XYZ_uintp"
...  <many screenfulls more> ...




More information about the Numpy-discussion mailing list