|
From: <co...@ph...> - 2006-01-27 21:38:01
|
Sasha <nd...@ma...> writes: > On 1/27/06, Travis Oliphant <oli...@ee...> 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 You need to add #include "Python.h" as the first include (and add a -I<python include directory> to your gcc line, of course). -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |co...@ph... |