develooper Front page | perl.perl5.porters | Postings from April 2000

Is it possible to use the shared object compiled by perlcc?

From:
Li, Yi-Shin
Date:
April 30, 2000 05:28
Subject:
Is it possible to use the shared object compiled by perlcc?
Message ID:
002e01bfb2a2$09ec7240$0101a8c0@p400
In my system (perl 5.6 and 5.005.03), the doc of
perlcc says :

Typing 'perlcc a.p' compiles the code inside a.p into a
standalone executable, and perlcc A.pm will compile into a
shared object, A.so, suitable for inclusion into a perl
program via "use A".

I could compile the A.pm into A.so, but I can't use
it with the command "use A". Is it the problem of me
or perlcc ?

Here is the example code of mine :
----------------------------
(test.pl)
use DynaLoader;
use A;
print A::True(),"\n";
----------------------------
(A.pm)
package A;
sub True { return(1); }
1;
----------------------------

Step1: perlcc A.pm ==> successfully create A.so
Step2: mv A.pm B.pm
Step3: perl test.pl ==> error, message:

Can't locate A.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.6.0/i586-linux
/usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i586-linux
/usr/
local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at test.pl
lin
e 2.
BEGIN failed--compilation aborted at test.pl line 2.

---------------------------
My question is "Is it possible to use the .so file created by perlcc ?"
If "yes", would you please tell me which document should I read?

Thanks in Advance,

==
yslee







nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About