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

I tried to use perl paker to convert my code to exe but when I pressed on this file PGL.exe on windows seven or xp it didn't work ,I don't what is the problem , my script is using two Bioperl moudules. pp -M Bio::Seq -M Bio::SeqIO -o PGL.exe PGLocater.pl when I used the following command it gaves me afile .out which worked perfectly on Ubuntu but not on windwos. pp -M Bio::Seq -M Bio::SeqIO -o PGL.out PGLocater.pl can you give me any way to convert my script to work as console program or any shape on windows , I need it very urgent :)
  • Comment on perl to exe excutable file to work on windows (seven /xp)

Replies are listed 'Best First'.
Re: perl to exe excutable file to work on windows (seven /xp)
by aitap (Curate) on Nov 03, 2013 at 19:08 UTC

    when I used the following command it gaves me afile .out which worked perfectly on Ubuntu but not on windwos.
    This won't work, Ubuntu (Linux) executables are not compatible to Windows in any way (they are ELF linked to linux glibc while Windows executables are PE EXE linked to Windows DLL files). You need to install some kind of Perl for Windows (Strawberry Perl/ActivePerl/Citrus Perl), install a "packager" application (pp/CavaPackager/PerlApp by ActiveState) and package your application on Windows for Windows.

    See also: Packaging Perl Programs (is) Painful

      Ok thank you :)
Re: perl to exe excutable file to work on windows (seven /xp)
by bioinformatics (Friar) on Nov 03, 2013 at 19:10 UTC

    Do you have any reasons for converting to an .exe? A slight update to bioperl was released (1.6.922) that should make it easier to install with strawberry perl, which should mean you can run this directly (and pretty easily at that).

    Bioinformatics
      I want to spread this code as an excutable program for scientific reasons .
Re: perl to exe excutable file to work on windows (seven /xp)
by ww (Archbishop) on Nov 03, 2013 at 15:45 UTC

    Without more information -- such as error messages, warnings and any logged info -- it's hard to guess what's wrong. BUT since, if I understand you correctly -- your script didn't work on Windows when invoked from the command line, of course it's not going to work when converted to an exe with 'paker (sic)', Coro or any other mechanism.

    Nonetheless, and to give you an easy way to start seeking out the problem, you might want to check (CPAN, CPANTesters, bioperl, inter alia) whether all the modules you're using are compatible with Windows. (If any have xs components, the liklihood that they'll work on W32 starts to approach 0%.)

    But when you've done your due diligence, come back and show us the script, the errors, warnings, log entries and exactly how (and where) you packed the sources into an exe.

    P.S. spelling counts. The misspellings in your node will make it hard to find using normal search techniques for future visitors with similar problems.

      thank you very much , I well try to do what you've suggested thanx.
Re: perl to exe excutable file to work on windows (seven /xp)
by Anonymous Monk on Nov 04, 2013 at 14:43 UTC
    Consider, then, providing it as source, which would probably be much more useful to your scientific colleagues anyway.
      Greetings,
      As portability goes, you might also want to have a look at Swig.

      HTH

      --Chris

      #!/usr/bin/perl -Tw
      use perl::always;
      my $perl_version = "5.12.5";
      print $perl_version;