In the Polyspace Project, the structure of my files included are :
myProject
-Source
-Includes
-All H
files
-Source
-All C
files
-Include
-Directory having
all the H files
-Module
-Source
-Includes
- All H
files
-Source
- All C
files
-Configuration
- Configuration file
-Results
- Result directory
One of the H file, has all the definitions of variables /typedef/declarations and other H files refer to those.
While running Polyspace verification, the compilation step fails saying some of the typedefs are 'undefined' as:
a.h, line
66: error: identifier "float32_t" is undefined
Although 'float32_t.h' is defined in 't.h'.
https://www.mathworks.com/matlabcentral/answers/102925-why-is-polyspace-producing-compilation-errors-when-i-have-all-the-c-and-h-files-mentioned-in-the-sou#answer_112270
https://www.mathworks.com/matlabcentral/answers/102925-why-is-polyspace-producing-compilation-errors-when-i-have-all-the-c-and-h-files-mentioned-in-the-sou#answer_112270
The H files should only be included as a directory in project structure, as below :
myProject
-Source
-sources
-All C
files
-Include
-Directory having
all the H files
-Module
-Source
-sources
- All C
files
-Configuration
- Configuration file
-Results
- Result directory
This way H files inter-dependency is resolved.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!