----- Original Message ----- From: "Hart, Jody (AS)" <jonathan.h...@ngc.com>
To: <inline@perl.org>
Sent: Friday, February 12, 2010 3:51 AM
Subject: Installing Inline without a C compiler


I have an Inline module, with a working DLL file, running with Active
State Perl on Windows,
and I would like to distribute it to a number of users who do not and
cannot have a C compiler
on their machines (even though some are free).  Naturally, when I try to
install Inline without
a C compiler, I get a number of error messages when I enter "nmake" and
"nmake test", but
I was wondering if I could just go ahead with "nmake install" since the
Inline code doesn't
appear to have anything that requires a C compiler.  Then if my module
appears to work, everything is
OK.  Or am I missing something?  Has anyone tried to do this?  Thanks
very much for your insights.

===============================

Hi Jody,
Should be do-able. When you run 'perl Makefile.PL' you'll be prompted to *not* install Inline::C (if no C compiler is found). Just enter 'y' at the prompt to force installation of Inline::C, then run 'nmake install'. That should then run Inline::C scripts just fine - so long as Inline::C doesn't see a need to compile the C code. That's where it gets a little tricky.

Inline is going to expect the dll to be in a specific location - if it's not there, Inline::C will try to recompile.

One thing you could do is to specify the location (fully qualified path) in your module. That is, in your module:

use Inline Config =>
 DIRECTORY => '\_Inline_build';

Then you must distribute that _Inline_build directory, and insist that it be installed at the top level. If it gets put in the wrong place, recompilation will ensue - and, since there's no compiler, that will fail.

The module itself can be installed in the usual place on each machine.

In order to compile your module using that DIRECTORY option you will first have to create the _Inline_build (or whatever you want to call it) directory. The build directory doesn't have to be a top level folder - you could specify '\X\Y\_build' if you wanted to. But you do need to specify a full path, and the full path needs to be the *same* on *every* machine. If that's going to be difficult there's a slightly more complicated solution (that avoids this issue) in "How do I create a binary distribution using Inline?" in 'perldoc Inline-FAQ'.

(I'm assuming that all of the other machines are running MS Windows and ActivePerl.)

Cheers,
Rob

Reply via email to