I have a simple MATLAB code containing some of the commands like 'imfill', 'pdarray', etc. When I am generating code from this using MATLAB Coder then I can observe that some of the files although included in the source code (.C code) using the #include tag but those files are not generated as part of the code generation.
Code snippet which show the files included are:
#*include* "ippreconstruct.h"#*include* "tmwtypes.h"
The above header files although included in the .C file but are not generated. So when I am using the generated code to compile them in some other application (say Visual Studio), I get the error that these header files are missing.
However, I can observe that some of the other MATLAB specific header files like ‘rtwtypes.h’ do get generated along with the other main source codes.
Reproduction steps:
1. Start MATLAB coder using the below command in MATLAB R2013b:
>> coder
2. Include the MATLAB file under the ‘Entry-Point Files’
3. Under the ‘Build’ tab choose ‘Output type’. (say ‘C/C++ Executable).
4. Click on ‘Build’ button.
5. Check the Code Generation Report for the generated code.
Please note: I am attaching the sample MATLAB code (fillholes_test.m) with this article.
Best Answer