http://qs321.pair.com?node_id=322034

batkins has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way to create Win32 EXE's of Perl scripts on a UNIX machine?
Are you sure it was a book? Are you sure it wasn't.....nothing?

Replies are listed 'Best First'.
Re: Making Perl EXE's on a *NIX machine
by vek (Prior) on Jan 17, 2004 at 15:05 UTC

    You could always just use PAR on the winders machine itself - no?

    -- vek --
Re: Making Perl EXE's on a *NIX machine
by thospel (Hermit) on Jan 17, 2004 at 16:33 UTC
    Or use something like dosemu or even wine. (Totally untested, but it ought to work). You need a real exe converter to run under them of course (perl2exe or PAR).

      Running win32 perl under wine with win32 PAR? I do not think he wants to go there. First off, wine doesn't work half the time, second off...this is a fairly hackish solution.

      Basically what the question-poster needs to know is that *NIX developers really have no interest in making cross compilers that target their arch-nemesis of an operating system. You can do cool things like cross-compile for AMD64 or IA64 on IA32, but you can't target foreign OS's (usually). Similarly, I don't think there are any win32 compilers that create Linux apps. The closest 'foreign' cross compiler I can think of is Watcom/OpenWatcom, which targets OS/2, Netware, DOS, and Win32 when running from Win32. Does this help with Perl? No. Are all of these OS's above really odd? Yes.

      The only workable answer I can think of -- There may be ways to do this with VMware. VMWare would not be free, but it would allow you to install Windows on a Linux box and make it "believe".

      My suggestion -- find the cheapest computer you can find, and get it to run Windows for you.