I cannot see my c-compiler in matlab

Matlab 2012a on Windows7.
I want to simulate a simulink model. However, it shows error like this.
/////////////////////// Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler. ///////////////////////
So I tried to use the command 'mex -setup' on matlab command window. But, it shows no compiler! msgs are like this
///// 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/R2012a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? //////////////////
But I installed, visual studio 2012 and also windows SDK 7.1 which support Matlab. I checked the list at http://www.mathworks.com/support/compilers/R2012a/win64.html
What can I do for it more?
Thanks in advance.
2. Additional question. I didn't add any C code to the simulink model. Is is correct for Matlab to use C-compiler for the model, even I didn't do anything with C?

Answers (1)

Image Analyst
Image Analyst on 13 Oct 2013
Did you say "y" to the question "Would you like mex to locate installed compilers [y]/n?"

2 Comments

yes. but it says this
/////// 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/R2012a/win64.html
Error using mex (line 206) Unable to complete successfully. ////////////////
Don't know what to do :(
Call Mathworks tech support.

Sign in to comment.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Asked:

on 13 Oct 2013

Commented:

on 14 Oct 2013

Community Treasure Hunt

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

Start Hunting!