MATLAB: Do I get the error ‘The current model configuration differs from the model configuration used to generate the shared utility code folder’ when building a model hierarchy

hierarchymodelsreferencesharedutilssimulink codertflchecksum

I am trying to generate code for a model containing reference models.
When I build the parent model, I get the following error message:
Error building model 'myModel'. The current model configuration differs from the model configuration used to generate the shared utility code folder
When I click on the hyperlink shown in the Diagnostic Viewer to review parameter differences, all the parameters are equal apart from TflCheckSum.
How can I change that?
I have also tried to delete the 'sharedutils' folder as suggested in the Diagnostic Viewer, but I still get the same error message.

Best Answer

This issue is related to the fact that there are differences in the configuration parameters between top and referenced models.
The error occurs if there are differences in the 'Standard math library' parameter in Configuration Parameters > Code Generation > Interface > Advanced parameters.
For instance, this parameter could be C89/C90 (ANSI) for the parent model and a child model, and C99 (ISO) for another child model.
In order to solve this issue, please make sure to use the same Configuration parameters. Configuration references can help avoid parameter mismatches: