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

I'm a programmer who's been lucky enough to spend most of my career working on Solaris installations.
As such, I find myself now having to develop code at my new job on NT. (ack!)

Sooooo....
I tried, and failed miserably getting Tk to work... By now I've reinstalled PERL a few times. I've tried ActiveState, IndigoPerl, and an older 5.004 implementation.
So far - no luck finding a binary to get this working.
I've recently put on a new C compiler & installed nmake.exe to try compiling from scratch like I would under UNIX.
But it only seems to create more problems.

Is there a decent package somewhere that I can download to use the Tk.pm module under Windows NT?
It would be so nice to be able to type perl -e "use Tk;" and not have a problem.

Thanks in advance!

Wait! This isn't a Parachute, this is a Backpack!

Replies are listed 'Best First'.
(tye)Re: So what's the deal with Perl/Tk on win32?
by tye (Sage) on Mar 17, 2001 at 02:22 UTC

    I used PPM to install Tk with no problems. Using the GUI package manager of IndigoPerl would make it even easier.

    Trying to compile Tk yourself is going to be a lot of work, unfortunately.

            - tye (but my friends call me "Tye")
Re: So what's the deal with Perl/Tk on win32?
by LiTinOveWeedle (Scribe) on Mar 17, 2001 at 03:17 UTC
    Hi, I am using ActiveState 5.6.0 distribution with Tk now on my NTs. All what I need after instalation was run ppm.pl Perl Package Manager (in perl/bin/ppm.pl) and search for new version of TK lib (verify or search command) and then install. By default package manager connect only to ActiveState server but this can be change by set command if you want look for something special.

    Here is completely list of libs there are curently available at ActiveState for using with ver. 5.6.0.

    Tk ver 800.022 is listed here too. I am using it and all seems work fine.

    Li Tin O've Weedle
    mad Tsort's philosopher

Re: So what's the deal with Perl/Tk on win32?
by orbital (Scribe) on Mar 17, 2001 at 03:45 UTC
    Under NT I have had much more success using Win32::Gui, it runs faster then TK, and the look and feel are native to the Win32 OS.

    Win32::GUI is a Win32-platform native graphical user interface toolkit for perl. basically, it's an XS implementation of most of the functions found in user32.dll and gdi32.dll, with an object oriented perl interface and an event-based dialog model that mimic the functionality of visual basic.

Re: So what's the deal with Perl/Tk on win32?
by dws (Chancellor) on Mar 17, 2001 at 22:35 UTC
    C:\> ppm install tk Should be sufficient if you're using ActiveState Perl.

    I did this yesterday on a new NT box. Worked like a charm.

      DWS, you are 100% correct! Worked like a charm on win32 on windoze 2000 with activestate perl 5.6.1
Re: So what's the deal with Perl/Tk on win32?
by gregor42 (Parson) on Mar 22, 2001 at 20:31 UTC

    OK, I stand corrected.

    I am abliged and properly humbled... (bowing head & backing away)

    I am but a bug, Holiness.

    I tried again with ActivePerl. Being that I am behind a nasty firewall, I downloaded the ppd file directly & ran ppm locally.

    Once I did this, it worked like a charm. But of course I have had many strange results along the way to get to this point.

    As always it is the journey that matters, not the destination, save only as the beginning of the next.



    Wait! This isn't a Parachute, this is a Backpack!
      Don't feel bad. People stumble into this one all of the time.

      What you're probably running into is this: your browser knows what about your firewall/proxy server, but Perl scripts (include PPM) do not.

      The (poorly documented) trick is to set the environment variable HTTP_PROXY to point to your proxy server. E.g.,     HTTP_PROXY=http://stupidfirewall.mycompany.com:8080/ LWP (LWP::UserAgent:env_proxy() in specific) will detect this setting, and use it when making HTTP requests.