baperl has asked for the wisdom of the Perl Monks concerning the following question:
but I get the following error#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; /*** skipping perl_run() ***/ call_argv("showtime", G_DISCARD | G_NOARGS, args); perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
I am working on ubuntu so I went into cpan and rang++ fn-test.cpp -o t 'perl -MExtUtils::Embed -e ccopts -e ldopts' g++: perl -MExtUtils::Embed -e ccopts -e ldopts: No such file or direc +tory fn-test.cpp:2:24: fatal error: EXTERN.h: No such file or directory compilation terminated.
it did it's thing for a while and now when I try to compile again, I get the same error. This is my first time trying to call a Perl program from C++, so any tips would be helpful.force install ExtUtils::Embed
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: calling perl program from C++
by ikegami (Patriarch) on Oct 01, 2011 at 21:28 UTC | |
by baperl (Sexton) on Oct 01, 2011 at 22:29 UTC | |
by ikegami (Patriarch) on Oct 01, 2011 at 22:42 UTC | |
by baperl (Sexton) on Oct 01, 2011 at 22:48 UTC | |
by ikegami (Patriarch) on Oct 01, 2011 at 22:52 UTC | |
| |
Re: calling perl program from C++
by Anonymous Monk on Oct 02, 2011 at 12:28 UTC |