Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

PerlApp and Win32::Unicode

by IB2017 (Pilgrim)
on Nov 13, 2017 at 19:49 UTC ( #1203287=perlquestion: print w/replies, xml ) Need Help??

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

Dear Monks

I am here again with another question (I am still working on a solution for the last one I posted) which has to do with packing my .pl in an .exe file using PerlApp (ActiveState). No help from ActiveState as I am out of their programm by now. I am trying to pack in an exe a script containing Win32::Unicode. This module apparently relies on Unicode.ddl. And this library is not loaded in my exe. I get the following error:

Can't load 'auto/Win32/Unicode/Unicode.dll' for module Win32::Unicode: + load_file:module not found at at /<C:\Users\IB\myprogram.exe>DynaLoa +der.pm line 222. at /<C:\Users\IB\myprogram.exe>Win32/Unicode/XS.pm line 8. BEGIN failed--compilation aborted at /<C:\Users\IB\myprogram.exe>Win32 +/Unicode/Error.pm line 12. BEGIN failed--compilation aborted at /<C:\Users\IB\myprogram.exe>Win32 +/Unicode/File.pm line 15. BEGIN failed--compilation aborted at myprogram.pl line 1.

My dummy simple script is nothing but the following

use Win32::Unicode::File; print "Hello"

My dummy script (and also my real, long script) works pretty well when started from the comand line. I checked and Unicode.dll is in here 'auto/Win32/Unicode/Unicode.dll'. Anyone knows a solution? PS: I read dozens of posts, but couldn't find a single solution. I wouldn't like to a) abandon the module which I discovered a few days ago in another post here b) abandon PerlApp which is still working fine for me. Of course I read the PerlApp manual, tryed every possibile configuration it came in my mind, but guess: I still get this error. Thank you in advance.

Replies are listed 'Best First'.
Re: PerlApp and Win32::Unicode
by Marshall (Canon) on Nov 13, 2017 at 20:21 UTC
    I am not at a system where I can even try to replicate your problem. However, I suggest that you add additional use statements: use Win32; and use Win32::Unicode; above what you have now. Give that a go and let us know what happens.

      THANK YOU! You made my day. It now works. However, I add too add an explicit use arybase; (I have no idea what it is) as it was missed when I run the new exe. The following works fine with my 5.16:

      use Win32; use Win32::Unicode; use Win32::Unicode::File; use arybase; print "Hello"
        ... add too add an explicit use arybase; (I have no idea what it is) ...

        See arybase on CPAN.


        Give a man a fish:  <%-{-{-{-<

        Hooray! Glad this worked for you.
        I had to do something similar 20+ years ago when I built my first complicated exe with PerlApp. How I figured that out is lost to antiquity.

        If you have a somewhat recent version of PerlApp, I recommend using the GUI. This makes some of the options easier to understand. Just type "perlapp" with no command line args and the GUI will start. It is possible to add an icon for desktop display. I believe it is also possible to force arbitrary files into the exe although I would use that feature with extreme caution and I haven't done that myself. I can mention this now because you are solving your problem in what I consider "the right way". Forcing a .dll manually is not, in my experience "the right way".

Re: PerlApp and Win32::Unicode
by salva (Abbot) on Nov 14, 2017 at 07:44 UTC
    I released Win32::Packer a couple of weeks ago. You may like to look into it and BTW, it handles DLL dependencies automatically.
Re: PerlApp and Win32::Unicode
by marto (Cardinal) on Nov 13, 2017 at 20:32 UTC

    Perhaps show the arguments you've tried calling perlapp with? Is there an equivalent to pp -x?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1203287]
Approved by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2020-09-26 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (141 votes). Check out past polls.

    Notices?