T
Torsten Mohr
Hi,
i'd like to compile and install the C++ example mentioned
in "perldoc perlxs". I use perl 5.8 on my Linux system.
I've put the whole test project here:
http://www.s.netic.de/tmohr/cc.tar.gz
I can successfully compile and install the underlying
libAmod.so, that contains code for a C++ class:
class aMod {
private:
int a;
public:
aMod();
~aMod();
int getA(void);
void setA(int v);
};
The XS file i wrote generates C code and contains code and
the perl module installs without errors. But when i call:
#! /usr/bin/perl -w
use aMod;
$a = aMod->new();
Use of inherited AUTOLOAD for non-method aMod::aMod() is deprecated at
./qwe.pl line 5.
Can't locate auto/aMod/aMod.al in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0 .....
It seems to me that "aMod" is somehow still unknwon to perl, maybe
due to a wrong startup code in aMod.pm (i've attached it below)?
Has anybody got a hint for me?
Best regards,
Torsten.
--------- aMod.pm:
package aMod;
#use strict;
use warnings;
require Exporter;
require DynaLoader;
our @ISA = qw(Exporter DynaLoader);
our @EXPORT = (
aMod
);
our $VERSION = '0.01';
bootstrap aMod $VERSION;
1;
__END__
i'd like to compile and install the C++ example mentioned
in "perldoc perlxs". I use perl 5.8 on my Linux system.
I've put the whole test project here:
http://www.s.netic.de/tmohr/cc.tar.gz
I can successfully compile and install the underlying
libAmod.so, that contains code for a C++ class:
class aMod {
private:
int a;
public:
aMod();
~aMod();
int getA(void);
void setA(int v);
};
The XS file i wrote generates C code and contains code and
the perl module installs without errors. But when i call:
#! /usr/bin/perl -w
use aMod;
$a = aMod->new();
Use of inherited AUTOLOAD for non-method aMod::aMod() is deprecated at
./qwe.pl line 5.
Can't locate auto/aMod/aMod.al in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0 .....
It seems to me that "aMod" is somehow still unknwon to perl, maybe
due to a wrong startup code in aMod.pm (i've attached it below)?
Has anybody got a hint for me?
Best regards,
Torsten.
--------- aMod.pm:
package aMod;
#use strict;
use warnings;
require Exporter;
require DynaLoader;
our @ISA = qw(Exporter DynaLoader);
our @EXPORT = (
aMod
);
our $VERSION = '0.01';
bootstrap aMod $VERSION;
1;
__END__