Mo Dejong 10-12-2005
This page describes how to build Tcl/Tk under Windows using the Msys and Mingw packages. Mingw is a gcc port for Windows that can be used to build native Win32 applications and dlls. Msys is a bash shell ported to Windows that is used to run Tcl's configure script. This page does not describe how to build Tcl/Tk with VC++, although that build environment is also supported. It may possible to build Tcl/Tk with other compilers like the Borland or Cygwin, but these tools are not well supported and will require some effort to get everything working.
Building Tcl/Tk 8.4.16, the current stable release.
First (Downloads):
Second (Unzip):
Third (Build Tcl):
Fourth (Build Tk):
NOTE: At this point everything is installed and should be working. You could delete /build and /src if you wanted to. You will find it all in /opt/tcl (C:\msys\opt\tcl). Run Tcl from the msys shell by starting the tclsh84 shell found in /opt/tcl/bin. Run Tk from the msys shell by starting the wish84 shell found in /opt/tcl/bin.
RS It's also useful to copy tcl84.exe to tclsh.exe, and add /opt/tcl/bin to the msys PATH, so that you can run scripts directly when their first line is the famous
#!/usr/bin/env tclsh
See also
Note: ensure that your msys.bat file contains a set PATH= at the top or you will get coredumps.
RS 2007-10-11: This advice leads, on my W95 box, to msys dying very soon after startup. Trying to find another way...
DKF: I never needed to do that, but then I use XP. (It's much more important to make sure that you install things in a directory without spaces in the name; a lot of the build process is very fragile if you don't follow that...)
See Windows 95 for RS's adventures in building 8.5b1 on that unsupported platform...
LV Anyone tried this on Vista? Also, have you tried updating to newer versions of the compiler, etc. ? Just curious how robust of an environment mingw is. :Working fine under Windows 7 beta, so vista likely has no problems. Ian S.