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

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

7.3. Specifying the Location of Header Files (-I=<directory>)

To add a directory to the list of directories that the Intel® FPGA SDK for OpenCL™ Offline Compiler searches for header files during kernel compilation, include the -I=<directory> option in your aoc command.

If the header files are in the same directory as your kernel, you do not need to include the -I=<directory> option in your aoc command. The offline compiler automatically searches the current folder or directory for header files.

At a command prompt, invoke the aoc -I=<directory> <your_kernel_filename>.cl command.
CAUTION:

For Windows systems, ensure that your include path does not contain any trailing slashes. The offline compiler considers a trailing forward slash (/) or backward slash (\) as illegal.

The offline compiler generates an error message if you invoke the aoc command in the following manner:

aoc -I=<drive>\<folder>\<subfolder>\ <your_kernel_filename>.cl

or

aoc -I=<drive>/<folder>/<subfolder>/ <your_kernel_filename>.cl

The correct way to specify the include path is as follows:

aoc -I=<drive>\<folder>\<subfolder> <your_kernel_filename>.cl

or

aoc -I=<drive>/<folder>/<subfolder> <your_kernel_filename>.cl