Include directories
R2026bAdd folders to the include path
Model Configuration Pane: Code Generation / Custom Code
Description
Specify a list of include folders to add to the include path.
Settings
'' (default) | stringEnter a space-separated list of include folders to add to the include path when compiling the generated code.
Specify absolute or relative paths to the folders.
Relative paths must be relative to the folder containing your model files, not relative to the build folder.
The order in which you specify the folders is the order in which they are searched for header, source, and library files.
Note
If a folder path contains one or more spaces, you must enclose the path in double quotes. For example, this Include directories field entry, which specifies three folder paths, uses double quotes for the second and third paths:
C:\Project "C:\Custom Files" "C:\Library Files"
To specify the same folder paths from the command line, run:
set_param('mymodel', 'CustomInclude', ... 'C:\Project "C:\Custom Files" "C:\Library Files"')
Tips
To use the same custom code settings as those used for simulation, select Use the same custom code settings as Simulation Target. For more information, see Integrate External Code by Using Model Configuration Parameters.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No impact |
Programmatic Use
Parameter: CustomInclude |
| Type: character vector |
| Value: folder path |
Default: '' |
Version History
Introduced before R2006a