[Pyrex] pyrex and g++

Simon Burton simon at arrowtheory.com
Fri Sep 23 03:54:13 CEST 2005


I'm trying to compile some pyrex output with g++. (my project involves
wrapping a c++ library that has a c interface).
It looks like it is a hopeless task, but I thought I'd ask here before
giving up.

$ g++  -c test.c -I/usr/include/python2.3/
test.c:156: error: redefinition of `PyTypeObject __pyx_type_4test_A'
test.c:41: error: `PyTypeObject __pyx_type_4test_A' previously declared here
test.c: In function `void inittest()':
test.c:219: error: invalid conversion from `void*' to `__pyx_obj_4test_A*'
test.c:235: error: cannot convert `PyObject*' to `__pyx_obj_4test_A*' in
   assignment
test.c: At global scope:
test.c:247: error: redefinition of `char**__pyx_f'
test.c:37: error: `char**__pyx_f' previously declared here

$ pyrexc -v
Pyrex version 0.9.3.1

g++ -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.5/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-12)

test.pyx file attached.

Also see: Re: [Pyrex] Pyrex and GCC4.0:
http://lists.copyleft.no/pipermail/pyrex/2005-June/001237.html

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pyx
Type: application/octet-stream
Size: 179 bytes
Desc: not available
Url : http://lists.copyleft.no/pipermail/pyrex/attachments/20050923/f88a1176/test.obj


More information about the Pyrex mailing list