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,