This is a known issue for MATLAB R2017b and later releases. The workaround is as follows:
For those Simulink Function and Caller blocks with incorrect C/C++ function interface, perform the following action based on the MATLAB release:
In R2016b or R2017a release:
- Open the "Configure C/C++ Function Interface" dialog. Click Apply or OK.
- Save the model to preserve the changes permanently.
In R2017b or later release:
- Open the "Configure C/C++ Function Interface" dialog, and manually change the C/C++ function name and identifier names.
- Save the model to preserve the changes permanently.