By default, the Vitis HLS GUI continually parses all header files to resolve coding references. The GUI highlights unresolved references, as shown in the following figure:
- Left sidebar: Highlights unresolved references at the line number of the source code.
- Right sidebar: Displays unresolved references relative to the whole file.
Unresolved references occur when code defined in a header file (.h or .hpp extension) cannot be resolved. The primary causes of unresolved references are:
- The code was recently added to the file.
If the code is new, ensure the header file is saved. After saving the header file, Vitis HLS automatically indexes the header files and updates the code references.
- The header file is not in the search path.
Ensure the header file is included in the C code using an
#includestatement, and the header file is found in the same directory as the source C file, or the location to the header file is in the search path.Tip: To explicitly add the search path for a source file, select , click Synthesis or Simulation, and use the Edit CFLAGs or Edit CFLAGs commands for the source file as discussed in Creating a New Vitis HLS Project.
- Automatic indexing has been disabled.
Ensure that Vitis HLS is parsing all header files automatically. Select , click General, and make sure Disable Parsing All Header Files is deselected.