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

I'm trying to install the Tk module on my Windows 2000 machine with ActiveState Perl. When I type perl Makefile.pl I get (among other, normal-looking output) "'cl' is not recognized as an internal or external command, operable program, or batch file." I think 'cl' is supposed to be my C compiler, which is gcc. I notice that Makefile.pl has some lines with $Config{'cc'}. I tried replacing each $Config{cc} with 'gcc', but the problems don't go away. Am I on the right track? What is the right way to fix this?
  • Comment on Tk install -- Config{'cc'} giving wrong value?

Replies are listed 'Best First'.
Re: Tk install -- Config{'cc'} giving wrong value?
by Chmrr (Vicar) on Oct 15, 2001 at 23:57 UTC

    Unless you have a specific reason for attempting to compile the Tk module yourself, you should probably use the pre-compiled modules that ActiveState provides. Assuming you have a working internet connection, typing:

    ppm install Tk
    ..at a command prompt should do the Right Thing. For more information about the joys of PPM, read ActivePerl-faq2

    perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^+*`^ ve^#$&V"+@( NO CARRIER'

      Ahhhh... much easier. Many thanks. I suspected it wasn't supposed to be that hard.
Re: Tk install -- Config{'cc'} giving wrong value?
by Fletch (Bishop) on Oct 16, 2001 at 01:23 UTC

    It's trying to run the M$ compiler from VC++ (which is named cl and is what AS builds with). I'm not a Wintendo person (and much happier for it), but I'm pretty sure you don't want to try to use a different compiler to build extensions from what was used to build perl. Of course that could be outdated information.

    As was recommended previously, it's much easier to use ppm in Wintendo land and install a precompiled version someone else has already gotten working.