[Cython] C API declarations
Ilmar Wilbers
ilmarw at simula.no
Mon Jan 19 21:44:33 CET 2009
Hi,
I am having some serious problems with the C API declarations, chapter
7.2.2 i n the manual.
Using the exact two example files does not work for me, I keep getting:
marty.c:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘car’
marty.c: In function ‘main’:
marty.c:7: error: ‘car’ undeclared (first use in this function)
marty.c:7: error: (Each undeclared identifier is reported only once
marty.c:7: error: for each function it appears in.)
Using the other way, with public and including delorean.h instead of
delorean_api.h:
In file included from marty.c:1:
delorean.h:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘initdelorean’
marty.c:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’
before ‘car’
marty.c: In function ‘main’:
marty.c:7: error: ‘car’ undeclared (first use in this function)
marty.c:7: error: (Each undeclared identifier is reported only once
marty.c:7: error: for each function it appears in.)
Is there a problem with the header files that I don't understand? I run
Cython on delorean.pyx before running
gcc -c -I/usr/include/python2.5 -lpython2.5 marty.c
Has anyone tried these examples lately?
Sincerly, Ilmar
More information about the Cython-dev
mailing list