Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

UDF will not compile

    • salixb
      Subscriber

      I was using ANSYS Fluent 2023 and recently had to move to the Fluent 2025 R2. I had no problem using the UDF with the previous version of the software, but now am unable to compile/build the UDF. 

    • Rob
      Forum Moderator

      Try with the built in compiler. I can't remember any significant macro changes, but that would likely show up in the build error messages too. 

    • salixb
      Subscriber

      Hi Rob, 

      I tried with the built in compilier and get the following error: lld-link: error: undefined symbol. I am just confused as I had no problem with the .c file with the 2023 version of Fluent. 

      Thanks! 

    • Rob
      Forum Moderator

      All the files are in the same folder, and you're running Fluent standalone? Please can you post the actual error with all the text that's generated? Fluent's messages are usually quite long, and it's common to need to see the whole lot to diagnose. 

    • salixb
      Subscriber

      All the files are in the same folder. I am running Fluent from workbench. 

      Here is the error: 

      Copyright 1987-2025 ANSYS, Inc. All Rights Reserved.

      Compiler and linker: Clang (builtin)

      Compiler path: "C:\PROGRA~1\ANSYSI~1\v252\fluent"\ntbin\clang\bin\clang-cl

      Linker path: "C:\PROGRA~1\ANSYSI~1\v252\fluent"\ntbin\clang\bin\lld-link

      C sources: ['force_liu.c']

      lld-link: error: undefined symbol: P_DIAM

      >>> referenced by force_liu.obj:(LiuDrag)

      >>> referenced by force_liu.obj:(wangdrag)

      >>> referenced by force_liu.obj:(myBrownian)

       

      lld-link: error: undefined symbol: P_RHO

      >>> referenced by force_liu.obj:(myBrownian)

       

      lld-link: error: undefined symbol: P_DT

      >>> referenced by force_liu.obj:(myBrownian)

       

      lld-link: error: undefined symbol: P_TIME

      >>> referenced by force_liu.obj:(myBrownian)

      scons: *** [libudf.dll] Error 1

       

      Done.

    • Rob
      Forum Moderator

      P_DIAM and not PP_ or TP_ ? 

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