5 unshift @INC, '../lib';
10 open(my $fh,">embed_test.c") || die "Cannot open embed_test.c:$!";
16 my @cmd = ($Config{'cc'},-o => 'embed_test',"-I$INC[0]/..",
18 'embed_test.c',"-L$INC[0]/..",'-lperl',ldopts()
21 print "not " if system(join(' ',@cmd));
23 print "not " if system("embed_test");
25 unlink("embed_test","embed_test.c");
27 #gcc -g -I.. -L../ -o perl_test perl_test.c -lperl `../perl -I../lib -MExtUtils::Embed -I../ -e ccopts -e ldopts`
36 #define my_puts(a) if(puts(a) < 0) exit(666)
38 char *cmds[] = { "perl","-e", "print qq[ok 5\\n]", NULL };
40 int main(int argc, char **argv, char **env)
42 PerlInterpreter *my_perl = perl_alloc();
46 perl_construct(my_perl);
50 perl_parse(my_perl, NULL, (sizeof(cmds)/sizeof(char *))-1, cmds, env);
60 perl_destruct(my_perl);