Intel® FPGA SDK for OpenCL™ Standard Edition: Programming Guide

ID 683342
Date 4/22/2019
Public
Document Table of Contents

6.6.2.4. Displaying Information on OpenCL Host Runtime and MMD Libraries (link-config or linkflags)

To display a list of flags necessary for linking a host application with OpenCL host runtime and MMD libraries, invoke the link-config or linkflags utility command.
This utility command combines the functions of the ldflags and ldlibs utility commands.
At a command prompt, invoke the aocl link-config or aocl linkflags command.
The software displays the link options for linking your host application with the following libraries:
  1. The path to and the names of OpenCL™ host runtime libraries that provide OpenCL platform and runtime APIs. The OpenCL host runtime libraries are available in the INTELFPGAOCLSDKROOT/host/<OS_platform>/lib directory .
  2. The path to and the names of the Custom Platform-specific MMD libraries. The MMD libraries are available in the <board_family_name>/<OS_platform>/lib directory of your Custom Platform.
    Note: If you set up FCD correctly, the software will not print the path and names of the MMD libraries because the host no longer needs to link to the MMD libraries directly. The MMD libraries will be loaded during runtime through the FCD loader.
  • For Windows systems, the link options might resemble the following example output:
    /libpath:%INTELFPGAOCLSDKROOT%/board/<board_name>/windows64/lib
    /libpath:%INTELFPGAOCLSDKROOT%/host/windows64/lib
    alterahalmmd.lib
    <board_vendor_name>_<board_family_name>_mmd.[lib|so|a|dll]
    alteracl.lib
    acl_emulator_kernel_rt.lib
    pkg_editor.lib
    libelf.lib
    acl_hostxml.lib

    If you set up FCD correctly, the output will be /libpath:%INTELFPGAOCLSDKROOT%/host/windows64/lib OpenCL.lib

  • For Linux systems, the link options might resemble the following example output:
    -L/$INTELFPGAOCLSDKROOT/board/<board_name>/linux64/lib
    -L/$INTELFPGAOCLSDKROOT/host/linux64/lib
    -lalterac
    -ldl
    -lacl_emulator_kernel_rt
    -lalterahalmmd
    -l<board_vendor_name>_<board_family_name>_mmd
    -lelf
    -lrt
    -lstdc++

    If you set up FCD correctly, the output will be -L/$INTELFPGAOCLSDKROOT/host/[linux64|arm32]/lib -lOpenCL