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

Hi, I have a project which i want to convert into an exe and distribute to the users, so i am using the PP module to build the exe and when i run the exe it gives me some errors as below. Even if i convert a small perl file to and exe i get these sort of errors. What is the reason for such errors.As per my understanding when i create an exe using the 'PP' module it parses all the dependencies in my project and creates the exe and when i run on the target machine it extracts the modules and run them? , am i correct ? Below is the error which i get

Microsoft Windows XP Version 5.1.2600 (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\buildrelease>d: D:\>a.exe Can't load 'C:\DOCUME~1\BUILDR~1\LOCALS~1\Temp\par-6275696c6472656c65617365\cache-5de9d69c9cca0756a361818dac68b8a145a8584c\c8ece430.dll ' for module XML::Parser::Expat: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 200. at C:/strawberry/perl/site/lib/PAR/Heavy.pm line 120 Compilation failed in require at XML/Parser.pm line 18. BEGIN failed--compilation aborted at XML/Parser.pm line 22. Compilation failed in require at XML/DOM.pm line 41. BEGIN failed--compilation aborted at XML/DOM.pm line 70. Compilation failed in require at TestSuite.pm line 3. BEGIN failed--compilation aborted at TestSuite.pm line 3. Compilation failed in require at script/Test.pl line 4. BEGIN failed--compilation aborted at script/TestSuiteExecuter.pl line 4. D:\>
  • Comment on Error while running an exe built using the PP module.

Replies are listed 'Best First'.
Re: Error while running an exe built using the PP module.
by daxim (Curate) on May 31, 2012 at 09:59 UTC
    Include XML::Parser::Expat explicitely with -M.

      Its already included, the error message is XML::Parser::Expat: load_file:The specified module could not be found

      Basically, XML::Parser::Expat was compiled against libexpat.dll instead of the static version, and you have to include libexpat.dll with the -l option

      See Re: Missing libeay32.dll from an exe generated with pp utility

      I believe the option M has to be used to create a PAR file, how do i use it to create an exe. ?