Main Content


Find and add include (header) files to build information



findIncludeFiles(buildinfo,extPatterns) searches for and adds include files to the build information.

Use the findIncludeFiles function to:

  • Search for include files in source and include paths from the build information.

  • Apply the optional extPatterns argument to specify file name extension patterns for search.

  • Add the found files with their full paths to the build information.

  • Delete duplicate include file entries from the build information.

To ensure that findIncludeFiles finds header files, add their paths to buildInfo by using the addIncludePaths function.


collapse all

Find include files with file name extension .h that are in the build information, myBuildInfo. Add the full paths for these files to the build information. View the include files from the build information.

myBuildInfo = RTW.BuildInfo;
headerfiles = getIncludeFiles(myBuildInfo,true,false);
>> headerfiles

headerfiles = 


Input Arguments

collapse all

Object provides information for compiling and linking generated code.

To specify files for the search, the character vectors or strings in the extPatterns argument:

  • Must start with an asterisk immediately followed by a period (*.)

  • Can include a combination of alphanumeric and underscore (_) characters

Example: '*.h' '*.hpp' '*.x*'

Introduced in R2006b