MATLAB: Invalid MEX-file

real time workshop

hi, will any body please help me to sort out the following error while using the real time workshop generated S-Function :
Error while obtaining sizes from MEX S-func 'Pump_sf' inlPump at Startup/Pump at Startup_sfcn'. MATLAB error message:
Invalid MEX-file 'C:\Programme\Pump_sf.mexw32': The specified procedure could not be found.

Best Answer

Was the S-Function generated on your machine, or elsewhere? The error about "The specified procedure could not be found." usually occurs when the MEX-function tries to load additional libraries that are not present on your system. Assuming that the S-function doesn't explicit load any DLLs, the most likely issue is that the S-function was compiled with some version of Microsoft Visual Studio and depends on the Visual Studio redistributables corresponding to that version. You need to find out which version of Visual Studio was used and install the right distributables.