This error is caused by missing the Microsoft Visual C++ 2013 redistributable. Resolve this error by downloading and installing the redistributable from Microsoft via this link:
I would hope that installing the VC2005 Redistributable would allow your S-Function to work on an arbitrary machine. But, it sounds like you already tried this.
Visual C++ does allow for static linkage of the VC runtime (the /MT switch); you might try using this switch when you link. In MEX, you can add to the the LINKFLAGS settings (see the "Override Option Details" section of themex documentation -- I'm not sure exactly how this manifests itself in an S-Function).
Unfortunately, I don't have VC2005 installed to actually see if this actually works. :(
Best Answer