Ansys Common Fluids API Build and Usage
Last update: 24.03.2026CFF SDK Content
The CFF developer package contains:
include/
In the header files, the main include/ directory should be added to the build path
lib/
win64/*.lib
win64/*.dll
... The object libraries for Windows.
- Note
- Link against the static
.libfiles during the build process. -
Ensure the
.dllfiles can be found by your applications at runtime by setting your%Path%variable correctly.
linx64/*.so
... The object libraries for Linux.
- Note
- The libraries must be provided during the build process.
-
Ensure the
.sofiles can by found by your applications at runtime by setting yourLD_LIBRARY_PATHvariable correctly.
example/
hdf/
... Source files, for example executables that show how to read and write CFF grid and solution files.
project/
... Source files for example executable that show how to read and write CFF project files.
Compiling and Linking on Windows
Requirements
- Microsoft Visual Studio 2019 or newer (64-bit build environment)
To build an application using the CFF SDK, it is required to
- Add the
includefolder to the include folder list for the C++ preprocesssor - Use the provided
.libfiles found in thelibfolder when linking your application to the API
- Note
- You will likely want to link all libraries in the folder except
libansysfluidsprojectqt.lib. This library requires Qt libraries. Delete or move this file to a different location to use the*.libwildcard. -
libansysfluidsproject.libis only required when using the Project API.
For example, to build one of the provided demonstration files, from a 64-bit build environment:
cd example/hdf/CellNode/
cl cellnode.cpp /I..\..\..\include ..\..\..\lib\winx64\*.lib /EHsc
To run the examples, the lib/win64/ .dll files must be either in the current directory, or in the windows Path%
cd example/hdf/
copy ..\..\lib\win64\*.dll .
cellnode.exe
A wrapper script is also provided to ease the library path setup:
cd example/hdf/
run.bat cellnode.exe
Compiling and Linking on Linux
Requirements
- g++ 8.2 or compatible
- RedHat/Centos 7.4 , newer or compatible
To build an application using the CFF API, it is required to
- Add the
includefolder in the include folder list for the C++ preprocesssor - Build the source files using the CFF API without the C++11 binary interface, that is, use the switch
-D_GLIBCXX_USE_CXX11_ABI=0 - Use the provided
.so files found in thelibdirectory when linking your application to the API.
- Note
- Link with all libraries in the folder except
libansysfluidsprojectqt.so. This library requires Qt libraries. To use the*.so wildcard, erase or move the file.libansysfluidsproject.sois only required for the Project API.
For example, to build one of the provided demonstration files:
cd example/hdf/CellNode/
g++ cellnode.cpp -I../../../include/ ../../../lib/linx64/*.so -D_GLIBCXX_USE_CXX11_ABI=0 -o cellnode.exe
To run the examples, the linx64/ .so files should typically be in the LIBRARY_PATH
cd example/hdf/
export LD_LIBRARY_PATH=/path/to/lib/linx64:$LD_LIBRARY_PATH
./cellnode.exe
A wrapper script is also provided to ease the library path setup:
cd example/hdf/
./run.sh cellnode.exe