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.
david
--
s,.*,<<,e,y,\n,,d,y,.s,10,,s
.ss.s.s...s.s....ss.....s.ss
s.sssss.sssss...s...s..s....
...s.ss..s.sss..ss.s....ss.s
s.sssss.s.ssss..ss.s....ss.s
..s..sss.sssss.ss.sss..ssss.
..sss....s.s....ss.s....ss.s
,....{4},"|?{*=}_'y!'+0!$&;"
,ge,y,!#:$_(-*[./<[EMAIL PROTECTED],b-t,
.y...,$~=q~=?,;^_#+?{~,,$~=~
y.!-&*-/:[EMAIL PROTECTED] ().;s,;,
);,g,s,s,$~s,g,y,y,%,,g,eval
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]