Building TCL/TK 8.6.4 with Visual Studio 2010

Downloads

For the impatient:

Note: The process for building these is much more simple than the one for Visual Studio 2013, but I include this here for reference anyway...

Prerequisites

  1. You need Visual Studio 2010. I cannot believe I am writing this down as a prerequisite on a page that has the title building TCL/TK 8.6.4 with Visual Studio 2010.
  2. You need the TCL/TK sourcecode. In the following, I am using Tcl 8.6.4 and Tk 8.6.4
  3. Unzip the sourcecode. At the end, you should have two directories, for example c:\tk8.6.4 and c:\tcl8.6.4.

Building the 32-bit version

  1. Open Visual Studio Command Prompt (2010)
  2. Change to the win subdirectory in the TCL source folder. For example, for me this is C:\tcl8.6.4\win
  3. Run nmake -f makefile.vc
  4. Change to the win subdirectory in the TK source folder. For example, for me this is C:\tk8.6.4\win
  5. Run set TCLDIR=..\..\tcl8.6.4 to ensure TK finds TCL.
  6. Run nmake -f makefile.vc
  7. Note: you can stop reading here if you only need the release build. The next few steps show you how to build the debug binaries as well.
  8. Change to the win subdirectory in the TCL source folder. For example, for me this is C:\tcl8.6.4\win
  9. Run nmake -f makefile.vc OPTS=symbols
  10. Change to the win subdirectory in the TK source folder. For example, for me this is C:\tk8.6.4\win
  11. Run nmake -f makefile.vc OPTS=symbols

Building the 64-bit version

  1. Open Visual Studio Command Prompt x64 Win64 (2010)
  2. Change to the win subdirectory in the TCL source folder. For example, for me this is C:\tcl8.6.4\win
  3. Run nmake -f makefile.vc MACHINE=AMD64
  4. Change to the win subdirectory in the TK source folder. For example, for me this is C:\tk8.6.4\win
  5. Run set TCLDIR=..\..\tcl8.6.4 to ensure TK finds TCL.
  6. Run nmake -f makefile.vc MACHINE=AMD64
  7. Note: you can stop reading here if you only need the release build. The next few steps show you how to build the debug binaries as well.
  8. Change to the win subdirectory in the TCL source folder. For example, for me this is C:\tcl8.6.4\win
  9. Run nmake -f makefile.vc MACHINE=AMD64 OPTS=symbols
  10. Change to the win subdirectory in the TK source folder. For example, for me this is C:\tk8.6.4\win
  11. Run nmake -f makefile.vc MACHINE=AMD64 OPTS=symbols