Linking - Linking - 4.0 English - PG140

CIC Compiler v4.0 LogiCORE IP Product Guide (PG140)

Document_ID
PG140
Release_Date
2026-07-22
Version
4.0 English

Linux

To use the C model, the user executable must be linked against the correct libraries for the target platform.

The executable must be linked against the following shared object libraries:

  • libgmp.so.11
  • libIp_cic_compiler_v4_0_bitacc_cmodel.so

Using GCC, linking is typically achieved by adding the following command line options:

-L. -Wl,-rpath,. -lIp_cic_compiler_v4_0_bitacc_cmodel

This assumes the shared object libraries are in the current directory. If this is not the case, the -L. option needs to be changed to specify the library search path to use.

Using GCC, the provided example program, run_bitacc_cmodel.c, can be compiled and linked using the following command:

gcc -x c++ -I. -L. -lIp_cic_compiler_v4_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, it must be visible to the model while running.

Windows

The executable must be linked against the following dynamic link libraries:

  • libgmp.dll
  • libIp_cic_compiler_v4_0_bitacc_cmodel.dll

Depending on the compiler, the import libraries might also be required:

  • libgmp.lib
  • libIp_cic_compiler_v4_0_bitacc_cmodel.lib

Using Microsoft Visual Studio, linking is typically achieved by adding the import libraries to the Additional Dependencies entry under the Linker section of Project Properties.