Main Content

addAdditionalHeaderFile

Add header file to array of header files for code replacement table entry

Description

example

addAdditionalHeaderFile(hEntry,headerFile)adds a specified additional header file to the array of additional header files for a code replacement table entry.

This function adds -I to the compile line in the generated makefile.

Examples

collapse all

This example shows how to use the addAdditionalHeaderFile function with addAdditionalIncludePath, addAdditionalSourceFile, and addAdditionalSourcePath to specify additional header and source files fully for a code replacement table entry.

% Path to external header and source files
libdir = fullfile('$(MATLAB_ROOT)','..', '..', 'lib');

op_entry = RTW.TflCOperationEntry;
.
.
.
addAdditionalHeaderFile(op_entry, 'all_additions.h');
addAdditionalIncludePath(op_entry, fullfile(libdir, 'include'));

addAdditionalSourceFile(op_entry, 'all_additions.c');
addAdditionalSourcePath(op_entry, fullfile(libdir, 'src'));

Input Arguments

collapse all

hEntry is a handle to a code replacement table entry previously returned by instantiating a code replacement table entry class, such as hEntry = RTW.TflCFunctionEntry or hEntry = RTW.TflCOperationEntry.

Example: op_entry

headerFile is a character vector or string scalar that specifies an additional header file.

Example: 'all_additions.h'

Version History

Introduced in R2007b