|
From: <co...@ph...> - 2006-01-28 00:42:15
|
Sasha <nd...@ma...> writes: > On 1/27/06, David M. Cooke <co...@ph...> wrote: >> You need to add #include "Python.h" as the first include (and add a >> -I<python include directory> to your gcc line, of course). > > Still does not work > >> cat test.c > #define PY_ARRAY_TYPES_PREFIX XYZ_ > #include <Python.h> > #include <numpy/arrayobject.h> > >> gcc -I Python-2.4.1/include/python2.4 -I lib/python2.4/site-packages/numpy/core/include -c test.c > In file included from > lib/python2.4/site-packages/numpy/core/include/numpy/arrayobject.h:1346, > from test.c:3: > lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h: > In function `import_array': > lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:765: > parse error before ')' token > lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:765: > parse error before ')' token > lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h: > At top level: > lib/python2.4/site-packages/numpy/core/include/numpy/__multiarray_api.h:771: > parse error before "return" Hmm, the location of that error would seem to imply it's something to do with NDARRAY_VERSION not being defined. Maybe for some reason you've got an old arrayobject.h, but a newer __multiarray_api.h? I'd try blowing away your lib/python2.4/site-packages/numpy directory, and installing again. -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |co...@ph... |