> Dan Muey wrote: > > [snip] > > > /* From David > > printf("%s",SvPV_nolen(eval_pv(perlcode,0))); > > at compile: > > cc -o perlemb perlemb.c `perl -MExtUtils::Embed -e ccopts -e ldopts` > > /tmp/ccTi5bTD.o: In function `main': > > /tmp/ccTi5bTD.o(.text+0x77): undefined reference to `eval_pv' > > /tmp/ccTi5bTD.o(.text+0x82): undefined reference to `SvPV_nolen' */ > > perl_destruct(my_perl); > > perl_free(my_perl); > > } > > i don't have a version of xsubpp that matches your version. i have a > slightly better one and i don't have any problem compiling > the following: > > #include <EXTERN.h> > #include <perl.h> > > static PerlInterpreter *my_perl; > static const char *perlcode = > "use CGI 'header';print header();print 'hello World';"; > > main (int argc, char **argv, char **env) > { > SV* code; > > my_perl = perl_alloc(); > perl_construct( my_perl ); > > perl_parse(my_perl, NULL, argc, argv, (char **)NULL); > > perl_run(my_perl); > > code = eval_pv(perlcode,0); > > printf("%s", SvPV_nolen(code)); > > perl_destruct(my_perl); > perl_free(my_perl); > } > > [panda]# cc test.c -o test `perl -MExtUtils::Embed -e ccopts > -e ldopts` [panda]# > > your xsubpp came with Perl v5.6.0, yes? i will try to find a > machine with > 5.6.0 and see what happen.
Doh! I was on 5.5, 5.8 just worked for me to, 5.6.1 also! Great! Awesome! Perfect! One little catch now is it'd be nice to just do ./test or ./test name=value&name2=val2 instead of ./test -e '' Or ./test <ctrl-D> I'll have to look into that, I know it has something to do with perl_parse() and #include stdio I just don't know the details...yet :) Thanks for the help David very cool stuff, as I said to someone else about this it's kind of a Rube Goldburg experiment! > > david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]