MATLAB: Am I unable to use an S-function Builder block in Simulink 5.0 (R13) that was compiled on a different machine using MSVC

buildercdifferentinstalledinvalidmex filemicrosoftmsvcnotpcs-functionsimulinkvisual

Why am I unable to use an S-function Builder block in Simulink 5.0 (R13) that was compiled on a different machine using MSVC?
I have an S-function Builder block that I compiled on one PC using Microsoft Visual C 6.0. It works on that machine. But if I copy my model and all other files, including the .dll file, to an identical PC that does not have Microsoft Visual C installed, I cannot run my model. If I try, I receive the following error:
Unable to load mex file: E:\1290049\timestwo.dll.
The specified module could not be found.
??? Invalid MEX-file

Best Answer

This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in the S-Function Builder in Simulink 5.0 (R13) that is under investigation by our development staff. As a workaround, use the LCC compiler instead of Microsoft Visual C.