[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Embedding perl into my C application



fil@cs.ucsd.edu (Filippo Menczer) writes:

>I need to write my own Mac application in C, using
>Metrowerk CodeWarrior. I also need to embed a Perl
>interpreter into my application, so that I can execute
>Perl scripts from my program (it is a Web application
>for which I will use mainly the libwww-perl5 routines).

Sounds plausible.

>I would like to do as the perlembed document instructs,
>but where can I get the perl source that will compile on
>CW (miniperlmain.c, perl.h, EXTERN.h, etc...)?

Same place you got the application from, in the
Mac_Perl_507r1m_src.sit.bin archive.

Be advised, however, that the build process is nontrivial. I'd certainly be
interested in walking your through it. The more people who build MacPerl and
live to tell, the better.

Maybe it would be time for a roll call: Could anyone who has managed to
complete a build of MacPerl 5.0.7 or later send me a message?

>If all this fails, I guess I would have to resort to
>calling perl droplets from my C application with exec()
>or system(), and invoke MacPerl 5 to compile and
>execute them.

Surely you are joking!

>However, I am afraid this would be inefficient
>and perhaps even problematic as I understand that the exec()
>implementation in CW (or on Macs in general) is shaky.

Try "nonexistent".

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
   "I'm set free to find a new illusion" -- Velvet Underground