Re: Fwd: [Numpy-discussion] Numpy does not compile with PY_ARRAY_TYPES_PREFIX
by Sasha other posts by this author
Jan 27 2006 2:51PM messages near this date
Re: Fwd: [Numpy-discussion] Numpy does not compile with PY_ARRAY_TYPES_PREFIX
|
Re: Fwd: [Numpy-discussion] Numpy does not compile with PY_ARRAY_TYPES_PREFIX
On 1/27/06, David M. Cooke <cookedm@[...].ca> 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"
If I remove #define PY_ARRAY_TYPES_PREFIX or define it as nothing,
compilation works.
The RPy.h header I was trying to compile in the first plase includes
numpy/arrayobject.h after
Python.h .
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
Thread:
Sasha
Sasha
Sasha
Travis Oliphant
Travis Oliphant
Sasha
Andrew Straw
Sasha
Alexander Belopolsky
|