problem using swig to create perl module
problem using swig to create perl module
am 06.10.2005 17:10:43 von GIJoe
I just downloaded swig and installed it on a solaris machine. I tried
to run one of the examples and got this error message
Can't load './example.so' for module example: ld.so.1: perl: fatal:
relocation error: file ./example.so: symbol _ZdlPv: referenced symbol
not found at
/tps/global/depot/perl-5.8.5/lib/5.8.5/sun4-solaris/DynaLoad er.pm line
230.
at example.pm line 7
Compilation failed in require at runme.pl line 7.
BEGIN failed--compilation aborted at runme.pl line 7.
Any ideas how to solve this. Thanks in advance.
Joe
Re: problem using swig to create perl module
am 07.10.2005 09:06:25 von Sisyphus
"GIJoe" wrote in message
> I just downloaded swig and installed it on a solaris machine. I tried
> to run one of the examples and got this error message
>
> Can't load './example.so' for module example: ld.so.1: perl: fatal:
> relocation error: file ./example.so: symbol _ZdlPv: referenced symbol
> not found at
> /tps/global/depot/perl-5.8.5/lib/5.8.5/sun4-solaris/DynaLoad er.pm line
> 230.
> at example.pm line 7
> Compilation failed in require at runme.pl line 7.
> BEGIN failed--compilation aborted at runme.pl line 7.
>
> Any ideas how to solve this. Thanks in advance.
We don't see many swig questions here - and I get the impression that it's
not used much by perl folks, these days. Most of us take the more usual XS
approach, or use inline::C - which would be *my* recommendation on how to
solve the problem.
If you specifically want to use swig then perhaps your best bet is with the
swig mailing lists:
http://www.swig.org/mail.html
There could, of course, be someone lurking about here who *does* have the
knowledge to help you .... so stay tuned, just in case.
Cheers,
Rob
Re: problem using swig to create perl module
am 07.10.2005 16:16:56 von GIJoe
Thanks, Rob. I'll give that site a try. Swig is one of the approaches
recommended by the book Advanced Perl Programming. The example given
makes it look very straight forward. I guess it's never easy as it
seems. I do have another question, does XS work with C++ code? The book
says it doesn't, but maybe it is outdated.
Joe
Re: problem using swig to create perl module
am 07.10.2005 19:58:49 von tassilo.von.parseval
Also sprach GIJoe:
> Thanks, Rob. I'll give that site a try. Swig is one of the approaches
> recommended by the book Advanced Perl Programming. The example given
> makes it look very straight forward. I guess it's never easy as it
> seems. I do have another question, does XS work with C++ code? The book
> says it doesn't, but maybe it is outdated.
XS works very well with C++ and provides some convenient ways to map
C++-methods to Perl-methods. See 'perldoc perlxs', "Using XS With C++".
Tassilo
--
use bigint;
$n=714233503437702801613970263303373711390544118542200534375 65440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
Re: problem using swig to create perl module
am 08.10.2005 00:42:06 von Sisyphus
"Tassilo v. Parseval" wrote in message
> > I do have another question, does XS work with C++ code? The book
> > says it doesn't, but maybe it is outdated.
>
> XS works very well with C++ and provides some convenient ways to map
> C++-methods to Perl-methods. See 'perldoc perlxs', "Using XS With C++".
>
There's Inline::CPP as well, which op might also find useful.
Cheers,
Rob