Modules using shared libraries 
Author Message
 Modules using shared libraries

Hi,

I tried to locate this in perlxs and perlxstut, but didn't
have too much success...

I'm writing a module that is a wrapper around a 'C' library
(implemented as a number of shared libraries). I've no
problems with the XS setup, but can't get Perl to
load the libraries (using 'make test' I get the following
message:
PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib
        -I/opt/perl/lib/i486-linux/5.00404 -I/opt/perl/lib test.pl
1..1
/usr/bin/perl: can't resolve symbol 'S_INITIALIZE'
/usr/bin/perl: can't resolve symbol 'S_TERMINATE'
Can't load './blib/arch/auto/STATELD/STATELD.so' for module
        STATELD: Unable to resolve symbol at
        /opt/perl/lib/i486-linux/5.00404/DynaLoader.pm line 166.
 at test.pl line 11
BEGIN failed--compilation aborted at test.pl line 11.
not ok 1
make: *** [test_dynamic] Error 2

I added my libraries to Makefile.PL:

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
    'NAME'      => 'STATELD',
    'VERSION_FROM' => 'STATELD.pm',
    'LIBS'      => ['-L${STATELLIB} -lstatel -luow -lvfs -lutil'],
    'DEFINE'    => '',     # e.g., '-DHAVE_SOMETHING'
    'INC'       => '-I${STATELINC}',    
);

and the module compiles OK (the libraries are declared to ld.so).

I must have overlooked something obvious - a reference to the
FAQ or PODs would be enough.

Thanks a million,

Stefaan
--

PGP key available from PGP key servers ( http://www.*-*-*.com/ )
___________________________________________________________________
  "Don't worry about people stealing your ideas.  If your ideas
   are any good, you'll have to ram them down people's throats."
                                                -- Howard Aiken



Tue, 22 Aug 2000 03:00:00 GMT  
 Modules using shared libraries



Quote:
> Hi,

> I tried to locate this in perlxs and perlxstut, but didn't
> have too much success...

> I'm writing a module that is a wrapper around a 'C' library
> (implemented as a number of shared libraries). I've no
> problems with the XS setup, but can't get Perl to
> load the libraries (using 'make test' I get the following
> I must have overlooked something obvious - a reference to the
> FAQ or PODs would be enough.

Hate to follow up on my own posting, but its amazing what a
night's sleep and some perusing of the documentation can
achieve:

        ExtUtils::Liblist
Oh well, another lesson learned :-)

Stefaan
--

PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
  "Don't worry about people stealing your ideas.  If your ideas
   are any good, you'll have to ram them down people's throats."
                                                -- Howard Aiken



Wed, 23 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Can not find the shared library libperl.so while executing a C-program using Perl-interpreter

2. module shared library

3. modules using modules - shared objects

4. Using Perl Library Module Term::Complete

5. Embeding perl in C++ shared library

6. Shared libraries on IRIX?

7. multi-threaded shared library -> single threaded perl

8. Shared Libraries

9. Shared library conflict

10. Makefile.PL and Shared Libraries

11. 5.001 under OSF1/3.0 with shared libraries?

12. error in loading shared Libraries

 

 
Powered by phpBB® Forum Software