Fluids

Fluids

Cannot build UDF (getting error)

    • patrick-clark
      Subscriber
      I am trying to load a UDF into Fluent but I am getting this error 

      C:\PROGRA~1\ANSYSI~1\ANSYSS~1\v221\fluent\fluent22.1.0\src\main\global.h(9): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory

      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64\cl.EXE"' : return code '0x2'

      I have installed Visual Studio 22 and my Windows OS version is Windows 11. I've downloaded the Windows 11 SDK and I added the location of nmake.exe to my PATH as is the advice I have found online already. I've uninstalled VS 22 several times now as well.
    • Rob
      Ansys Employee
      I suspect it's the compiler being newer than Fluent recognises, I think we support VS 2017.  Strictly we don't support Win11, but I'm not aware of any issues. What happens if you use the build in CLANG compiler? 
      • patrick-clark
        Subscriber
        How do you use the built in CLANG compiler? 

        It could quite possibly be the version of VS that I installed so I will try changing versions. So there should be no problem that my Windows is updated to windows 11? I assume that I should also download the windows 10 SDK instead also? 

        I have many questions, so thank you for answering.
    • Rob
      Ansys Employee

      When you compile the UDF there's a tick box "use included compiler". Tick it. 

    • DrAmine
      Ansys Employee

      Update to the recent version and use the built-in compiler. No need to struggle with VS anymore.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.