ekopalypse has asked for the wisdom of the Perl Monks concerning the following question:
it builds the exe but crashes on perl_parse api function when executing it like this#include "pch.h" #include <EXTERN.h> #include <perl.h> static PerlInterpreter *my_perl; int main(int argc, char **argv, char **env) { my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, NULL, argc, argv, (char **)NULL); perl_run(my_perl); perl_destruct(my_perl); perl_free(my_perl); }
embeddedperl test.pl.
Note, the lib directory as well as the perl.dll has been copied over to VS output directory from the previously created and installed perl interpreter. It looks like the issue is that it is looking for a path or perl module called MSWin32-x64-multi-thread like ...\EmbeddedPerl\x64\Debug\lib\MSWin32-x64-multi-thread. (revealed by procmon) but this hasn't been created. As I'm neither an experienced perl user nor c/c++ programmer, it is most likely that the issue raised from something stupid I did. I tried it with perl 5.30 as well as with the bleed branch from github but the result was the same. Similar code was working on linux ubuntu 19.04. Questions:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Embedded perl on windows x64
by syphilis (Archbishop) on Aug 01, 2019 at 02:18 UTC | |
by ekopalypse (Novice) on Aug 01, 2019 at 08:16 UTC | |
by syphilis (Archbishop) on Aug 01, 2019 at 12:22 UTC | |
by ekopalypse (Novice) on Aug 02, 2019 at 13:00 UTC | |
|
Re: Embedded perl on windows x64
by bliako (Abbot) on Aug 01, 2019 at 01:16 UTC | |
by ekopalypse (Novice) on Aug 01, 2019 at 08:30 UTC | |
by bliako (Abbot) on Aug 01, 2019 at 20:26 UTC | |
by ekopalypse (Novice) on Aug 02, 2019 at 13:04 UTC |