Issue to compile MATLAB embedded code in R2013a

I have a Simulink model with some MATLAB function blocks in it. I did it using R2012a.
However, the model doesn't compile under R2013a. It says that it can't find any C compiler, which is needed for MATLAB Coder. I added the C compiler of MS Visual Studio 2012, using mex -setup, but the error remains.
Is there any known issue about this?
Also the Model Advisor gives an error, telling something about substituting the blocks with the ones of R2013a, but I didn't understand if that is referrend to the MATLAB functin bloks. I hope I don't have to redo ex-novo the whole model.
Note that all of this applies notwithstanding I saver the model in the new format .slx, as the advisor told me to do. Thanks, Luca

 Accepted Answer

The support for Visual Studio 2012 was incomplete in R2013a -- see this support solution for a patch. Let us know if this addresses your issue or not.

4 Comments

Thanks Ken, that is exactly the error I got. I will follow the procedure in the bug report. However, the machine mounting R2013a is in the Company I work in. I will have the possibility to access it only in few days. I won't miss to make you know if it works.
I'm having a similar issue with function blocks not working between version 2012 and 2013a. I tried running the upgrade adviser and it returns these errors:
"Error occurred during model compile.
Error using targetman>throw_make_error (line 578) (SLSF Diagnostic)"
As well as this suggestion:
"The 'FIMATH for fi and fimath constructors' with the 'MATLAB factory default' setting for the MATLAB Function block '...' is no longer supported. Changing this setting to use the 'MATLAB Function Block FIMATH'.:"
I'm using the compiler Microsoft Windows SDK 7.1 (<http://www.mathworks.com/support/compilers/R2013a/index.html?sec=win64>) Is there a way to fix this issue?
Thanks.
Muneer, that is a complete unrelated problem. I would create a new thread so many more people will see it.
Yes, The Patch fixed the problem. I can now run the model with no further issues. Thanks again!

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!