Click here to get back home

problem using swig to create perl module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
problem using swig to create perl module GIJoe 10-06-2005
Posted by GIJoe on October 6, 2005, 8:10 am
Please log in for more thread options


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/DynaLoader.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



Posted by Sisyphus on October 7, 2005, 5:06 pm
Please log in for more thread options




> 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/DynaLoader.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




Posted by GIJoe on October 7, 2005, 7:16 am
Please log in for more thread options


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



Posted by Tassilo v. Parseval on October 7, 2005, 7:58 pm
Please log in for more thread options


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=71423350343770280161397026330337371139054411854220053437565440;
$m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);


Posted by Sisyphus on October 8, 2005, 8:42 am
Please log in for more thread options




> > 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




Similar ThreadsPosted
Problem in using Win32::Process::Create July 24, 2007, 6:25 am
Image::Magick::Thumbnail::create problem September 24, 2004, 6:14 pm
PDF::Create (or alike) to create watermark for existing pdf file? June 11, 2006, 6:18 pm
Problems using Module PDF::Create February 18, 2005, 2:51 am
Newbie created one module but can't create another January 2, 2005, 10:22 pm
module to create Zork like game maps? June 22, 2005, 9:29 pm
Announce: DbBrowser, a module to create mysqll/postgresql based paginated CGI datagrids August 23, 2005, 2:25 pm
Problem with Net::SSH::Perl module December 22, 2004, 12:38 pm
Problem using C module in perl January 5, 2006, 5:03 am
perl cgi session module installation problem June 5, 2006, 11:11 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap