How to call .pl file on microsoft visual c++ 2003

M

mjk

..c file:
#include <EXTERN.h>
#include <perl.h>

static PerlInterpreter *my_perl;


int main(int argc, char** argv, char** env)
{
char *args[] = { NULL };
PERL_SYS_INIT3(&argc,&argv,&env);
my_perl = perl_alloc();
perl_construct(my_perl);


perl_parse(my_perl, NULL, argc, argv, NULL);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;


call_argv("showtime", G_DISCARD | G_NOARGS, args);


perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
return 0;



}

showtime.pl:
# showtime.pl
print "I shan't be printed.";

sub showtime {
print time;
}


but is not work, why?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top