Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
Show older comments
Dear Friends
Hi,
I am developing a simulink and I am in the beggining stage of it, while I face the problem of : Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
Can any body help me to solve this?
Thanks
7 Comments
Walter Roberson
on 17 Jul 2019
Which MATLAB version are you using and which compiler have you already installed?
hossein
on 17 Jul 2019
Walter Roberson
on 17 Jul 2019
https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2013a_SupportedCompilers.pdf lists the supported compilers. Be sure to look in the correct section for 32 bit vs 64 bit, and be sure to note that Stateflow only supports a more limited list of compilers.
You will probably need one of:
- sdk 7.1 (available for free download)
- visual studio 2012 professional
- visual studio 2010 professional
- visual studio 2008 professional
You should start by giving the command than is listed in the error message:
mex -v -setup
hossein
on 17 Jul 2019
Walter Roberson
on 17 Jul 2019
The command is
mex -v -setup
You put a space between the - and the setup
You will need to download and install one of the four compilers I listed.
hossein
on 17 Jul 2019
Walter Roberson
on 17 Jul 2019
https://www.mathworks.com/matlabcentral/answers/95039-why-does-the-sdk-7-1-installation-fail-with-an-installation-failed-message-on-my-windows-system#answer_184539
But I would need to see the output of the setup attempt.
Answers (0)
Categories
Find more on Computer Vision Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!