Licensing

Licensing

nmake error message when compiling a Fluent UDF ‘nmake’ is not recognized as an internal or external command, operable program or batch file.

    • FAQFAQ
      Participant

      Question: Fluent reports this error message when compiling a Fluent UDF: ‘nmake’ is not recognized as an internal or external command, operable program or batch file. Answer: UDFs require that a compiler be installed. Linux operating systems typically come with a number of compilers and any ANSI-compliant compiler will do. Windows requires that “Microsoft Visual Studio” is installed. See the Ansys Help//Windows Installation Guide//Compiler Requirements for which versions are compatible with the version of Ansys you are running. The Community Edition requires the user to register after 30 days and is subject to certain restrictions under Microsoft Terms & Agreements. Please read the Terms & Agreement from Microsoft before you decide to use this version as this version is not free for commercial customers. https://visualstudio.microsoft.com/license-terms/mlt553321/. As an alternative, you can 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. For example, the Build Tools can be downloaded from the following link: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017. Once installed, update the udf.bat file in the C:Program FilesANSYS Incv19.xfluentntbinwin64 directory (rename the existing udf.bat first) and add the following line. “if exist “%MSVC_DEFAULT%BuildToolsVCAuxiliaryBuildvcvarsall.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.