Search code examples
perlvisual-c++mingwvisual-c++-6strawberry-perl

Can I embed Strawberry Perl in a VC++ 6.0 compiled application or use Inline::C with the compiler mismatch?


I am looking at embedding perl 5.10 in a large C++ application compiled with VC++ 6.0. This leads to two questions.

1) Is it a bad idea to simply use Strawberry Perl as a dependency rather than compile my own perl with VC++ 6.0? Would Strawberry even work given the compiler mismatch? I presume Strawberry is compiled with mingw. I would much rather not have to keep my own custom perl build around.

2) If I went the Strawberry route, would something like Inline::C work in the embedded application? You'd have VC++ 6.0 code calling mingw compiled Strawberry in turn calling user mingw compiled code. Inline::C would be an awesome capability for what I'm trying to achieve with the embedded perl interpreter.


Solution

  • Given the uncertainty involved, I would recommend compiling Perl using MSVC instead of experimenting with Strawberry Perl for this application. There are instructions in perlwin32 and a related discussion on Perl Monks to guide you.

    As a former release manager for Strawberry Perl, I can tell you it's not terribly difficult to do if you're comfortable with a compiler already.

    -- xdg