MATLAB Answers

0

I am getting the below mentioned problem when I am simulating "Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler."

Asked by shailesh on 6 Feb 2014
Latest activity Commented on by shailesh on 18 Feb 2014
I am getting the below mentioned problem when I am simulating "Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler."

  0 Comments

Sign in to comment.

Tags

2 Answers

Answer by Mischa Kim
on 6 Feb 2014
 Accepted Answer

Shailesh, as the msg implies you need to tell MATLAB which compiler should be used. Which, of course, means that there needs to be at least one compiler installed on your system. Then simply run
mex -setup
in the command window and choose the/a compiler.

Answer by Alexander on 6 Feb 2014

If you run "mex -setup" from the matlab command line it should give you the option to specify a compiler, if you have one. If you don't already have one installed, you can download and install the Microsoft SDK or Visual C++ express.