- Install the “Microsoft Visual C++ Build Tools” which contains just the basic compilation tools with no integrated development environment (IDE) and these are sufficient to compile UDFs. Build Tools can be downloaded from https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15
- Once installed, update the udf.bat file in the C:\Program Files\ANSYS Inc\v19.x\fluent\ntbin\win64 directory (rename the existing udf.bat first) and add the following line.
“if exist “%MSVC_DEFAULT%\BuildTools\VC\Auxiliary\Build\vcvarsall.bat” set MSVC=%MSVC_DEFAULT%\BuildTools”
- If the ‘nmake’ error still occurs after a compiler has been installed then this is normally due to Microsoft Visual Studio not being installed with sufficient permissions on Windows. The compiler needs to be installed with sufficient administrative rights that allow the registry to be edited. For example, it is possible for a user to have admin rights but not have rights to edit the registry. If this is the case then you will need to have IT install the compiler with full IT admin rights.