How to solve this error as mentioned- "Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler"

3 次查看(过去 30 天)
Error-Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
My laptop is Windows 8(genuine) 64 bit. I am trying to run my code in MATLAB R2013a which is having State flow charts and S function parameter block. I have gone through the matlab forums to get the solution for this but it is not working. please suggest me the correct way to solve this.

采纳的回答

Walter Roberson
Walter Roberson 2013-9-1
What happens when, at the MATLAB command line, you give the command
mex -setup
  1 个评论
Mahua
Mahua 2013-9-1
when i give the command in matlab--- mex -setup
Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win64.html
Error using mex (line 206) Unable to complete successfully.
  1. i have tried to install the compiler from the following link but it is not supporting, mine is windows 8. i m confused whether this is the issue or not. http://www.mathworks.in/support/compilers/R2013a/index.html

请先登录,再进行评论。

更多回答(1 个)

Salman Khalidi
Salman Khalidi 2016-6-5
I am also facing this problem. but i am using Matlab R2012b. I have also installed the supported compiler for this version i.e. Microsoft windows SDK 7.1 but problem persist. Still same error occur >> mex -setup
Welcome to mex -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012b/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2012b/win64.html
Error using mex (line 206) Unable to complete successfully.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by