S-Function 'FAST_SFunc' does not exist

I am using matlab 2017a to simulate sample programs in the FAST_v8.16.00a-bjj. When I run Run_OpenLoop.m for the first time I received following error

After going through the threads on this forum for the same error I came to know I have to compile FAST_SFunc.c in the source folder. So I run create_FAST_SFunc, but received the following error.

On thread about a similar issue [url]S-Function Compiling], I found the following answer.

I commented out the line 173, and it got compiled in matlab but then when I run Run_OpenLoop.m again, Matlab got crashed and I received this error

https://www.dropbox.com/s/3oa5skyxabaxvf9/fast.JPG?dl=0

I pressed "attempt to continue " and found this error

I have tried it on 2016b as well (using windows7 and 10) but received the same error.

Waiting for your expert opinion.

Regards

Dear Kamran,

I don’t think that you need to recompile the FAST S-Function, unless you require some change to the source code. Instead, I would use the following forum topic for advice: S-Function 'FAST_SFunc' does not exist - #2 by Bonnie.Jonkman (e.g. MATLAB may not know the correct path).

Best regards,

Dear Jason Jonkman,

Thank you for a prompt reply. I had already read this thread before, but this time when I used a fresh copy of fast. It worked for me.

Sincere Regards,
Kamran Ali