Running nmake to compile Gen user exits or having the build tool to build the stub executables may fail with the following error,:
fatal error U1052: file 'ntwin32.mak' not found
Release: 8.6
The file NtWin32.Mak is found under the Microsoft Visual C SDK install include directory"C:\Program Files (x86)\Microsoft SDKs\Windows\...\include".
The error can occur if the SDK is not installed or if required environment variables have not been setup for the installed Visual Studio version.
If SDK is installed from command prompt ensure that "%Gen86%\Gen\GENENV.BAT" has been run to setup required environment variables for the installed Visual Studio version: Testing and Running Applications for Windows IT - GENENV.BAT
e.g. For Visual Studio 2019:
cd "%Gen86%\Gen"
genenv.bat 32 2019
Then using the same command prompt re-run the nmake command.