CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to use a non-standard C library in a UDF (https://www.cfd-online.com/Forums/fluent-udf/237062-how-use-non-standard-c-library-udf.html)

Krite2002 June 28, 2021 13:22

How to use a non-standard C library in a UDF
 
The UDF I am writing needs to be able to access a NetCDF file which requires the NetCDF library.

It is simple to use the additional library when I am writing a regular program. I am using Windows 10 and Visual Studio 2017. I have NetCDF added to the system path. Within Visual Studio, I can edit the project configuration properties to link to the include directories and additional library directories. Once those settings are changed I can use #include<netcdf.h>. It would be the same process for other libraries.

Is there a way to make it so when I compile a UDF in Fluent 19.1, it will recognize the NetCDF library? I tried just adding the netcdf.h header file in the functions\compile… dialogue box, but since there is more to the library than just the header file, it did not work. Are there settings for this somewhere within Fluent, or maybe some way to modify the libudf directory using Visual Studio after it is built in Fluent?

AlexanderZ June 29, 2021 03:54

ansys fluent customization manual
look for
Link Precompiled Object Files From Non-ANSYS Fluent Sources


All times are GMT -4. The time now is 22:10.