Search code examples
matlabvisual-studio-2010simulinkmex

Visual Studio Build Solution


I had Simulink model and have generated C code from MATLAB. Basically Simulink Model has many function and one S-Function with file Extension .mexw32 (hex code). The process of C-code generation is working without any error. Now that I have C-code and header files of my application, I wanted to build the solution file(.bat file) from these files with Visual Studio.

When I tried to build the files then I am getting error as shown in picture 1. What I conclude is, there is a problem with the .mexw32 file to build. I dont have source code (c code) for these S-function .mexw32 file. I think that could be the problem while building the solution.

Do I need source code to build the solution or that doesnt matter if I have it or not? Because only the .mexw32 file is causing the problem during buiding the solution.


Solution

  • Yes, you'll need the source code (or an equivalent .tlc file). A .mexw32 file will only run inside MATLAB.