SIMULINK click to generate C code to report an error
Error message:
Error encountered while executing PostCodeGenCommand for model ‘RTW_sc3’: Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting
Caused by:
Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting


Error message:
Error encountered while executing PostCodeGenCommand for model ‘RTW_sc3’: Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting
Caused by:
Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting


reason:
Caused by not setting the default encoding
Caused by not setting the default encoding
Solution:
Add these two sentences in the initialization:
currentCharacterEncoding = slCharacterEncoding(); slCharacterEncoding('Windows-1252');