1
votes

On my computer I installed matlab 2013a and visual studio 2012 professional (that contains c++ 2012). As i read on the mathworks website this compiler is compatible with matlab 2013a.

I'm running the programs on windows 8 64 bit.

the problem is that when i try to run a simulink code with a matlab function embedded simulink gives me this error:

"Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler."

So i use 'mex -setup' and i setup the compiler that matlab automatically recognise. however, after this operation i have again the same error.

someone knows how can I fix the problem?? :)

2

2 Answers

0
votes

Did you already check this link?
Apparently this is a bug. And the MathWorks just suggested change the compiler.

0
votes

I had exactly the same problem than you and I was using the same configuration as well.

I just installed visual studio 2010 professional and now everything is properly working. Try it.