VS2008调用perl脚本问题,高手快来围观!!!!
调用脚本“test_rw_read.pl”出现以下问题,OLE.DLL已经注册#include "EXTERN.h"
#include "perl.h"
static PerlInterpreter *my_perl;
int main()
{
int argc;
char **argv;
char **env;
char *embedding[] = {"","C:\\Program Files\\Broadcom Corporation\\NFC Test Tool\\Scripts\\test_rw_read.pl",""};
argv=embedding;
PERL_SYS_INIT3(&argc,&argv,&env);
my_perl = perl_alloc();
perl_construct(my_perl);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
perl_run(my_perl);
perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
}
正常的:
#include "EXTERN.h"
#include "perl.h"
static PerlInterpreter *my_perl;
int main()
{
int argc;
char **argv;
char **env;
char *embedding[] = {"","C:\\Perl\\eg\\example.pl",""};
argv=embedding;
PERL_SYS_INIT3(&argc,&argv,&env);
my_perl = perl_alloc();
perl_construct(my_perl);
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
perl_run(my_perl);
perl_destruct(my_perl);
perl_free(my_perl);
PERL_SYS_TERM();
}