I can replicate the errors using a cut-down script Francois provided, and which I stripped further to only use Glib. I used Dependency Walker to check the hierarchy and pp_autolink is packing all the needed dlls.
I then checked my own (working) code, and it adds the PAR_TEMP folder to the path before loading Glib. Francois - can you add the begin block from the code below to your script and test if it works? If it does then maybe PAR_TEMP should be appended to the path by PAR, but that's Roderich's call. Regards, Shawn. use strict; use warnings; BEGIN { if ($ENV{PAR_0}) { print "Adding $ENV{PAR_TEMP} to the path"; use Config; $ENV{PATH} .= "$Config{path_sep}$ENV{PAR_TEMP}"; } }; use Glib; print "1\n"; On Tue, 12 Feb 2019 at 20:46, RAPPAZ Francois via par <par@perl.org> wrote: > Hi there > > > > Roderich, some years ago was explaining why, once the lib/auto/Glib …/Gtk2 > had been hidden with renaming them in the par archive, running the exe made > with pp worked for a script using Gtk2: > > “Every DLL you add to the packed executable with "pp -l ..." is flatly > packed in the zip in directory shlib/ARCH and unconditionally extracted in > the cache area. Also the packed executable runs with the cache directory > prepended to PATH. So when asked to load the glue DLL for Gtk2.pm etc, > DyneLoader loads Gtk2.dll from the cache directory. That way we get rid of > the second copy of the DLLs (extracted and loaded with mangled names) and > inter-DLL symbol references work as expected. » > > > > On my pc (with a new perl set up), this recipe does not seems to work > anymore. Moreover, my folders in perl/site/lib/auto/Glib, …/Gtk2 …/Pango, > …/Cairo did not have corresponding glue dll Glib.dll, Gtk2.dll and so on, > even if these Gtk2 scripts are running fine from perl without these. So > why are these dll been needed after all ? > > > > I have found these glue dll in my c:/users/rappazf/AppData …. Folders from > the unpacking of previous par archives and placed these in a separate > folder c:/docs/perl_dll > > I have then include these in the par archive with –link, but the exe is > still crashing. > > > > should I select others dll files from these …lib/auto/… to be included > with link ? how can I select the correct one ? > > > > I tried to pack a 10 lines long script with using pp –x but once open, the > gtk window seems to block pp. Closing the window gives the control back to > pp but the resulting exe failed the same. > > > > Thanks for any comment > > > > François > > > > >