D
Dan Stromberg
Hi again.
I'm trying to get a C extension module I wrote with SWIG to work with
perl. I got it to work OK with python, but perl's being a little more
troublesome.
When I use the usual (?) incantation, I get compile-time errors:
$ make
#swig -python -o odirectcmodule.c odirectcmodule.swg
swig -perl5 -o odirect_perl.c odirectcmodule.swg
gcc -ansi -Wall -Dbool=char -I/usr/lib/perl/5.8.7/CORE -fpic -c odirect_perl.c
In file included from /usr/lib/perl/5.8.7/CORE/op.h:496,
from /usr/lib/perl/5.8.7/CORE/perl.h:2600,
from odirect_perl.c:703:
/usr/lib/perl/5.8.7/CORE/reentr.h:611: error: field ‘_crypt_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:619: error: field ‘_drand48_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:770: error: field ‘_random_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:775: error: field ‘_srandom_struct’ has incomplete type
In file included from /usr/lib/perl/5.8.7/CORE/perl.h:2605,
Is there something a little loopy with the way Ubuntu builds C extension
modules for perl?
I could try to find where _crypt_struct and such are defined and #include
the right header into the .c from SWIG, but shouldn't swig and the perl
extension module API's have a sort of in-advance agreement on how this is
to be done?
Is this a known problem?
Thanks!
I'm trying to get a C extension module I wrote with SWIG to work with
perl. I got it to work OK with python, but perl's being a little more
troublesome.
When I use the usual (?) incantation, I get compile-time errors:
$ make
#swig -python -o odirectcmodule.c odirectcmodule.swg
swig -perl5 -o odirect_perl.c odirectcmodule.swg
gcc -ansi -Wall -Dbool=char -I/usr/lib/perl/5.8.7/CORE -fpic -c odirect_perl.c
In file included from /usr/lib/perl/5.8.7/CORE/op.h:496,
from /usr/lib/perl/5.8.7/CORE/perl.h:2600,
from odirect_perl.c:703:
/usr/lib/perl/5.8.7/CORE/reentr.h:611: error: field ‘_crypt_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:619: error: field ‘_drand48_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:770: error: field ‘_random_struct’ has incomplete type
/usr/lib/perl/5.8.7/CORE/reentr.h:775: error: field ‘_srandom_struct’ has incomplete type
In file included from /usr/lib/perl/5.8.7/CORE/perl.h:2605,
Is there something a little loopy with the way Ubuntu builds C extension
modules for perl?
I could try to find where _crypt_struct and such are defined and #include
the right header into the .c from SWIG, but shouldn't swig and the perl
extension module API's have a sort of in-advance agreement on how this is
to be done?
Is this a known problem?
Thanks!