> 
> [panda]# perl ${PATH}/xsubpp -v
> 

xsubpp version 1.9507

> finally, i am VERY surprise that your code:
> 
> >const char *perlcode = "use CGI 'header';print header();print 'hello
> World';";
> 
> will work at all. the reason being is that the Perl 
> interpreter you create 
> with:
> 
> > static PerlInterpreter *my_perl;
> 
> does NOT support dynamic loading. if the module that you are 
> trying to use 
> is written entirely in Perl, it usually works but 'CGI' is 
> not written 
> purely in Perl. any module that uses XS/C must be loaded up 
> during start up 
> and the Perl interpreter you created does not support that. 
> even if you can 
> compile your script, you will get a nasty error when you 
> actually try to 
> run it. the error (depends on what version of xsubpp you are 
> using) usually 
> tells you that CGI.pm can not found. the solution is to link 
> a special file 
> after you create your interpreter. Embed.pm has a function 
> for creating 
> this file:
> 

Good to know, I'll change that to a simple print statement and see how it goes

> [panda]# perl -MExtUtils::Embed -e xsinit
> 
> this will create a file perlxsi.c in the current directory. 
> once you have 
> that, you need to link it against your object file and change:
> 
> > perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
> 
> to:
> 
> perl_parse(my_perl, xs_init, argc, argv, (char **)NULL);

I'll give that ashot after I get a super simple version to go.
This will be very very helpful!

> i omit a LOT of details but it's almost impossible to tell 
> you everything 
> you need to know to successfully embed Perl in C with a 
> single message.
> 

Absolutely, thanks for all of this!!

> david

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to