Hi I want to include in a Simulink model a block called "Matlab Function" in which I wrote a simple function with the m-file editor. When I try to run my model I have this error:
"Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler."
How can I do? I'm trying to download a compiler as Windows SDK 7.1, but the download is very very slow. Have you got some links to other compilers?
Thank you in advance!
I have Win7 64bit and matlab 2011a.
What can i download ? Visual studio and sdk Are too slow to Download. Is there some other alternative software? Thank you!
Try to run "mex -setup" anyway. I thought if you don't have any C compiler, the default lcc will be used. That should be enough if you just want to use MATLAB Function block in a Simulink model for simulation.
So. What Can I do? I read about the answer of Derek O'Connor, but He said always to download sdk and visual studio c++ and I can't do it!
Please give me a solution :(
I also have the same problem but i installed the Microsoft SDK and I have visual studio 2010 installed.
I receive the very same message. I installed microsoft VS 2013 and 2012. with 2012 I succeeded to configure mex -setup and MATLAB showed 'successfully recognized' message; still I can use MATLAB function block in SIMULINK because I receive that cursed error message!! please help it's pretty urgent my project is nearly due.