|
Between me writing the Visual C Developers Journal article, Embedding Perl into Visual C Projects and it actually being published, ActiveState introduced a new version based on Perl 5.6.
This unfortunately had the effect of breaking the embedding support, including the tricks highlighted in my article. The new version of ActivePerl, build 616, actually fixes all of the problems and makes the entire process of embedding much easier, and more compatible with the Unix system of embedding.
The resulting code is now much simpler to understand, and the whole process of embedding the interpreter is also much simpler. With reference to the original article, the following differences now apply:
- You no longer need to download and compile the source code - Perl comes with everything you need.
- You need only one file - the C file with the embedding calls in it, the other files are no longer required.
- We no longer need the object based interface to the embedded interpreter.
To make it easier, I've created a new version of the source code and a suitable Makefile for running direct through nmake or similar. The Zip file also includes a compiled version of the final script. You should be able to compile the source simply by running make. Make sure you've downloaded the 616 build of ActivePerl, which you can obtain from ActiveState.
Download the updated Zip file for the Embedding Perl article.
|