Updated 2018-02-08 15:27:34 by APN

Tk will fail to compile when building with the default SDK that comes with Visual Studio 2017 Update 4 or later. See the Tk ticket https://core.tcl.tk/tk/tktview?name=3d34589aa0 for details as to why.

This does not mean you cannot use new VS releases to build. It just means that when you use the newer releases, you have to explicitly specify the older SDK that came in VS 2017 releases prior to Update 4. The last SDK that can be used to build Tk is 10.0.15063.0. When setting up the command line environment, this must be passed to vcvarsall.bat, for example
vcvarsall x64 10.0.15063.0 

to set up a 64-bit build environment (x86 for 32-bit).

The SDK can be downloaded independently or it can also be installed via the VS 2017 installer which gives you a choice of one or more SDK's to install. Note you can install multiple SDK versions with no issues. Just make sure you pick the correct one via vcvarsall as shown above.