anchor.diff:  :# MSVC 32-bits compiler, linker, and librarian
   if not defined %VC%.BIN set "%VC%.BIN=!%VC%!\BIN"
   set "%VC%.PATH=!%VC%.BIN!"
  -for %%d in ("!%VC%.BIN!") do ( :# For BIN dirs like amd64_arm
  -  for /f "tokens=1,2 delims=_" %%a in ('echo %%~nxd') do ( :# Split the 2 halves
  -    :# Append the first half [amd64 in the above example] to the path
  -    if not "%%b"=="" set "%VC%.PATH=!%VC%.PATH!;%%~dpd%%a"
  -  )
  -)
  +if not "!%VC%.BIN2!"=="!%VC%.BIN!" set "%VC%.PATH=!%VC%.PATH!;!%VC%.BIN2!"
   set "%VC%.PATH=!%VC%.PATH!;!%VS%.IDE!;!%VS%.TOOLS!"
   set %VC%.CC="!%VC%.BIN!\CL.EXE"
   set %VC%.LK="!%VC%.BIN!\LINK.EXE"
  
positive.code: %FUNCTION0%
  set "VS=VS95"
  set "VC=VC95"
  set "SEARCH_IN=call :FindVsIn x86 bin"
  goto :lastvs95	&:# Skip all Visual Studio versions that don't support Win95 development anymore
  
  :findvsXP	&:# Find the latest Visual Studio version supporting WinXP development
  %FUNCTION0%
  set "VS=VSXP"
  set "VC=VSXP"
  set "SEARCH_IN=call :FindVsIn x86 bin"
  goto :lastvsXP	&:# Skip all Visual Studio versions that don't support WinXP development anymore
  
  :FindVsIn %1=Proc %2="SUBDIRS" %3=DIRNAME	&:# Test if Visual Studio is present in the proposed directory
  %ECHO.D% :# Searching the %1 compiler in %3
  set "%VS%=" & set "%VC%=" & set "%VC%.BIN="
  :# The Visual C++ subdirectory can be named VC, VC98, or VC7 depending on the VS version.
  for %%s in (%~2) do (
    for %%p in (%PF64AND32%) do (
      :# %ECHO.D% :# Searching in "%%~p\%~3\VC*\%%s"
      for /d %%d in ("%%~p\%~3\VC*") do if exist "%%d\%%s\cl.exe" (
        set "%VS%=%%~dpd" &:# Remove the VC* subdir name
        set "%VS%=!%VS%:~0,-1!" &:# Remove the trailing '\'.
        set "%VC%=%%d"
        set "%VC%.BIN=%%d\%%s"
        set "%VC%.CC="%%d\%%s\cl.exe""
        exit /b 0
      )
    )
  )
  exit /b 1
  
  :lastvs	&:#  VS Installation directory					AKA.   _MSC_VER	 Min SUBSYSVER	Default SUBSYSVER	Notes
  %SEARCH_IN% "Microsoft Visual Studio 16.0"	&& goto :foundvs    &:# VS TBD
  %SEARCH_IN% "Microsoft Visual Studio 15.0"	&& goto :foundvs    &:# VS 2017	  2000
  %SEARCH_IN% "Microsoft Visual Studio 14.0"	&& goto :foundvs    &:# VS 2015	  1900
  :# %SEARCH_IN% "Microsoft Visual Studio 13.0"	&& goto :foundvs    &:# N/A
  :lastvsXP
  %SEARCH_IN% "Microsoft Visual Studio 12.0"	&& goto :foundvs    &:# VS 2013	  1800	    5.01	    6.00
  %SEARCH_IN% "Microsoft Visual Studio 11.0"	&& goto :foundvs    &:# VS 2012	  1700	    5.00	    5.00
  %SEARCH_IN% "Microsoft Visual Studio 10.0"	&& goto :foundvs    &:# VS 2010	  1600	    5.00	    5.00
  %SEARCH_IN% "Microsoft Visual Studio 9.0"	&& goto :foundvs    &:# VS 2008	  1500	    5.00	    5.00
  :lastvs95
  %SEARCH_IN% "Microsoft Visual Studio 8"		&& goto :foundvs    &:# VS 2005	  1400	    4.00	    5.00	Tested and known to work fine
  %SEARCH_IN% "Microsoft Visual Studio .NET 2003"	&& goto :foundoldvs &:# VS 7.1	  1310	    4.00	    4.00	Tested. Some problems worked around.
  %SEARCH_IN% "Microsoft Visual Studio .NET"	&& goto :foundoldvs &:# VS 7.0	  1300
  :# %SEARCH_IN% "Microsoft Visual Studio"	&& goto :foundoldvs &:# VS 6	  1200					Tested. MsvcLibX compilation fails. Unsupported. 
  SET "%VS%="
  %RETURN0%
  
  :foundoldvs
  set "NEEDSHORTPATH=1" &:# Work around bug in old nmake handling of !IF EXIST("Program Files (x86)")
  :foundvs
  :# Find Visual Studio Common Files, which can have one of two names.
  :# The common files subdirectory can be named Common or Common7 depending on the VS version.
  
negative.code: if exist "!SUBDIR!\kernel32.lib" (
    %ECHO.D% :# Found
    set "WINSDK=%~1"
    set "WINSDK_VER="
    set "WINSDK_BIN=!SUBDIR:\Lib=\Bin!"
    set "WINSDK_INCDIR=!WINSDK!\Include"
    set "WINSDK_INCLUDE=!WINSDK_INCDIR!"
  