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:
It is possible to include files using a relative or absolute paths. The syntax for relative paths is shown in the following link Relative Custom Code Include Path
To include a absolute path for include files with embedded coder you can simply goto Configuration Parameters -> Code Generation -> Custom Code -> Include Directories and then type in your folder paths i.e. C:\My_Folder\
Best Answer