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

ID 683846
Date 12/13/2021

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

7.4. 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.

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


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


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