Building the Software Application - 2023.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
Release Date
2023.2 English

The software application, written in C/C++ using the XRT native API, is built using the GNU C++ compiler (g++) which is based on GNU compiler collection (GCC). Each source file is compiled to an object file (.o) and linked with the Xilinx Runtime (XRT) shared library to create the executable which runs on an x86 or embedded Arm processor.

To use the native XRT APIs, the host application must link with the xrt_coreutil library. For example:
g++ -g -std=c++17 -I$XILINX_XRT/include -L$XILINX_XRT/lib -lxrt_coreutil -pthread

Compiling host code with XRT native C++ API requires C++ standard with -std=c++17. On GCC version older than 4.9.0, use -std=c++1y instead because -std=c++17 is introduced to GCC from 4.9.0.

Tip: g++ supports many standard GCC options which are not documented here. For information refer to the GCC Option Summary.