The issue stems from the "S-function modules" entry in the S-function dialog box. File names should be entered here without the ".c" extension. you may try entering filename without any extension to resolve the issue.
You can also refer to the link below to understand more about S-function modules and their programmatic use.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.