Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

error in embeding perl in C

by jithoosin (Scribe)
on Dec 15, 2005 at 15:11 UTC ( #516973=perlquestion: print w/replies, xml ) Need Help??

jithoosin has asked for the wisdom of the Perl Monks concerning the following question:

HI monks,
I got an error like this when i executed a C code which calls a perl subroutine which inturn uses many other perl modules
Can't load module IO, dynamic loading not available in this perl. (You may need to build a new perl executable which either supports dynamic loading or has the IO module statically linked into it.) at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/IO/Handle.pm line 256 Compilation failed in require at /usr/lib/perl5/5.8.0/i386-linux-threa +d-multi/IO/Handle.pm line 256. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/i386-linux-t +hread-multi/IO/Handle.pm line 256. Compilation failed in require at /usr/lib/perl5/5.8.0/i386-linux-threa +d-multi/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/i386-linux-t +hread-multi/IO/Seekable.pm line 101. Compilation failed in require at /usr/lib/perl5/5.8.0/i386-linux-threa +d-multi/IO/File.pm line 112. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/i386-linux-t +hread-multi/IO/File.pm line 112. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.0/Email/ +Valid.pm line 9. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.0/Em +ail/Valid.pm line 9. Compilation failed in require at /home/smug/public_html/libs/MiscLib.p +m line 13. BEGIN failed--compilation aborted at /home/smug/public_html/libs/MiscL +ib.pm line 13. Compilation failed in require at /home/smug/public_html/libs/BC.pm lin +e 8. BEGIN failed--compilation aborted at /home/smug/public_html/libs/BC.pm + line 8. Compilation failed in require at compat_check_tags.pl line 25. BEGIN failed--compilation aborted at compat_check_tags.pl line 25.

The command i used for compiling the code was cc -o power power.c `perl -MExtUtils::Embed -e ccopts -e ldopts`where power.c is the name of the C file. Could any one help me to find the error.I am using perl verison 5.8.0

Replies are listed 'Best First'.
Re: error in embeding perl in C
by salva (Canon) on Dec 15, 2005 at 15:24 UTC
    look for "Using Perl modules, which themselves use C libraries, from your C program" inside the perlembed docs.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://516973]
Approved by pfaut
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2023-01-30 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?