Dear Jan, Thank you for trying to resolve this issue. Below is what I've found.
> You seem to have a copy of the tkkit in your Perl tree at: > > C:\Perl\lib\auto\Tcl\copy_of_tkkit.dll > > I moved the file out of the directory but the error remained. The executable was half the size though. Thanks! > I also notice that you run your executable from the Z: drive > whereas your local drive > seems to be C:. Could you copy the executable somewhere onto your local > disk and run > it from there? If it makes a difference, could you explain what kind of > drive Z: is? > This had no effect either. Z is an external encrypted hard drive using TrueCrypt. > Also, could you check if the directory > C:\DOCUME~1\Anthony\LOCALS~1\Temp\pdk-Anthony\auto\Tcl\ > actually exist and what the content are? > This is interesting. The directory doesn't exist. Normally, it seems temporary files are created in, C:\Documents and Settings\Anthony\Local Settings\Temp Here, I have a huge number of directories like pdk-Anthony-1348, pdk-Anthony-6136, pdk-Anthony-6140 etc. They contain more directories, each holding one or more binaries (one being tkkit.dll) as well as other file, icons and so on. This is what I expect. I create lots of different versions of executables and these temporary files are not removed on exit from the program. (It's interesting to know where the original script is in all these files, but that's a different topic). > Finally, would you mind doing a clean installation of the latest ActivePerl > 5.10.1.1007 > and PDK 8.2.1 to see if the problem is still reproducible? > > I installed PDK 8.2.1but the problem was identical. So, I delved a little further and found where the problem is. First, I created a new minimal script (without dnd): use strict; use Tkx; my $e; my $mw = Tkx::widget->new("."); my $w_edit = $mw->new_entry(-name=>".current_dir",-textvariable=>\$e); Tkx::MainLoop; I ran as a regular script without problem. Then I compiled it with PDK and the error error came back! So, then I replaced the dnd embedded tkkit.dll with the original tkkit.dll and the problem vanished. The compiled executable worked as normal. So, clearly, the tclsh script was creating a revised tkkit.dll with some problem in it. To confirm this, I then ran the tclsh script again on my (now) working tkkit.dll. Note that the 2nd line (package require vfs::mk4) is required or the command vfs::mk4::Mount $tkkit tkkit will report an error that the command vfs::mk4::Mount does not exist). package require vfs ; #installed in latest versions of ActivePerl package require vfs::mk4 ; #this is necessary for the vfs::mk4::Mount command set tkkit "C:/Perl/lib/auto/Tcl/tkkit.dll" ; # set to correct path file attributes $tkkit -readonly 0 ; # needs to be writable vfs::mk4::Mount $tkkit tkkit ; # mounts file as dir 'tkkit' # modify to where you installed Tcl, with lib subdir set tcllib "C:/Tcl/lib" # this is one of the built-in $::auto_path search areas set tkkitlib "tkkit/lib" # path to tkdnd lib files, complete with pkgIndex.tcl set tkdnd "$tcllib/tkdnd2.0" file copy -force $tkdnd $tkkitlib vfs::unmount tkkit exit After running the above Tclsh script, my previously working minimal Tkx script produced another broken PerlApp executable with the same error as before: Can't create 'C:\DOCUME~1\Anthony\LOCALS~1\Temp\pdk-Anthony/auto/Tcl/Tcl.dll': Permission denied at perlapp line 909. BEGIN failed--compilation aborted at /<Z:\all_files_20090303\software_development\dnd_testing\dnd_test_ver3_embedding_dnd_in_tkkit.exe>Tkx.pm line 206. BEGIN failed--compilation aborted at dnd_test_ver3_embedding_dnd_in_tkkit.plline 2. So basically we're back to square one. The method to add the package tkdnd to the tkkit.dll works until we try to create a standalone executable. Laurence.