MATLAB: Can the header file not be found

Trying to build my Simulink model, I get the following error:
C1083: Cannot open include file: No such file or directory.
The file is on the path, why can it not be found?

Best Answer

Simulink will check for directories to include in the current folder, and then in the include directories path. If the file is in neither of these locations, this error will be thrown.
Check to make sure that the path is defined in this location:
Simulink Model Settings -> Code Generation -> Custom Code -> Include Directories (at the bottom)
Alternatively, you can use this link as another way to add the path to the include directories list: