This is a strange one... I embedded perl into a c program and all was working well. I used the example from O'Reilly's Programming Perl which seems to be the same as other examples I've seen on the web...
int main( int argc, char** argv, char** env ) { 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(); }
This WAS working!
I then installed other bits and bobs onto my Angstrom Linux Dist (Gumstix) such as Apache, PHP, FileZilla, Proftpd and all their endless dependencies and almost filled my 2GB micro SD bootable disk (about 90% full).
I then tried to run the embedded perl app (which was working) and I got a Segmentation Fault immediately and now get it every time I try to run the app.
I've 'make clean'd perl and re-installed from source but still the same. The strange thing is, perl seems to works fine, I can run %perl myPerlScript.pl no problems at all but when I run my embedded perl app I get Segmentation Fault. What could have changed???
I've not included too much detail here since to be honest I'm not sure what information will be of any use (remember, this WAS working).
I'm a perl and linux newbie.
Thanks for any help.
In reply to perlembed segmentation fault by 4Xsake
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |