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

Hello monks, I wrote a script to send an email. I am using Net::SMTP::TLS module.I installed it using cpan.I made an exe of script using pp, it works fine on my machine. When i move it to a different machine it gives missing libeay32.dll.I have come across few nodes in perlmonks but none of them helped me. I am using strawberry perl. I have tried below options: 1.Have placed libeay32.dll file in a folder and added it to path. 2.tried -l c:\openssl\libeay32.dll in pp utility. Nothing seems to work. Any help on how to get rid of this error. Thank you Akhila. Update : Posting the error Can't load 'C:\Users\PRASUN~1\AppData\Local\Temp\par-50726173756e612042617468616 c61\cache-c28bddca7a19b2cb367686019ad52fda9ece2852\03d2af7c.dll' for module Net: :SSLeay: load_file:The specified module could not be found at C:/strawberry/perl /lib/DynaLoader.pm line 190. at C:/strawberry/perl/site/lib/PAR/Heavy.pm line 75 Compilation failed in require at Net/SMTP/TLS.pm line 89. BEGIN failed--compilation aborted at Net/SMTP/TLS.pm line 89. Compilation failed in require at script/Test.pl line 7. BEGIN failed--compilation aborted at script/Test.pl line 7.
  • Comment on Missing libeay32.dll from an exe generated with pp utility

Replies are listed 'Best First'.
Re: Missing libeay32.dll from an exe generated with pp utility
by Anonymous Monk on Apr 19, 2012 at 03:38 UTC
Re: Missing libeay32.dll from an exe generated with pp utility
by bulk88 (Priest) on Apr 18, 2012 at 19:20 UTC
    Untested last resort crazy hack. Use LoadLibrary from Win32 on libeay32.dll in a BEGIN block before you use/require Net::SMTP::TLS. Dependencey Walker is probably a tool you should use.
      I tried using dependacy walker. It says "Error: At least one file was not a 32-bit or 64-bit Windows module."
        What is the full Dependency Walker log when you start the process using Dependency Walker?

        Strawberry Perl includes its own libeay and libssl in the c/bin folder. Make your Strawberry Path or what your giving to pp to include in the exe all matches up. I think you are using a libeay dll from something else that isn't strawberry perl. Thats very difficult to support (version/compile time options/cygwin or mingw or VC C lib).