Compiling and Linking - 1.0 English - PG390

RFSoC DFE Fast Fourier Transform LogiCORE IP Product Guide (PG390)

Document ID
PG390
Release Date
2024-05-30
Version
1.0 English

Place the header files (xdfe_fft_v1_0_bitacc_cmodel.h, xip_common_bitacc_cmodel.h and gmp.h) with other header files in your project.

Compilation varies from platform to platform but GCC 6.2.0 or later is recommended.

Linux

To compile the example code, run_bitacc_cmodel.c, first ensure that the directory in which the files libIp_xdfe_fft_v1_0_bitacc_cmodel.so, libgmp.so.11 and libgmpxx.so.4 are located is present on your $LD_LIBRARY_PATH environment variable. These shared libraries are referenced during the compilation and linking process.

Place the header file and C++ source file in a single directory. Then in that directory, compile using the GNU C++ Compiler:

gcc -x c++ -I. -L. -lIp_xdfe_fft_v1_0_bitacc_cmodel -Wl,-rpath,. -o run_bitacc_cmodel run_bitacc_cmodel.c
Note: The C model dynamically links to libgmpxx.so.4 and therefore this library must be visible to the model while running.

Windows

When compiling on Windows, the symbol 'NT' must be defined either by a compiler option or in the user source code before the xdfe_fft_v1_0_bitacc_cmodel.h header file is included.

Link to the import libraries libIp_xdfe_fft_v1_0_bitacc_cmodel.lib and libgmp.lib. For example, in Microsoft Visual Studio.NET, in Project Properties, under Linker > Input, for Additional Dependencies, specify libIp_xdfe_fft_v1_0_bitacc_cmodel.lib and libgmp.lib.