No supported Visual C/C++ compiler found. Check your installation of Visual C/C++.

Hi,
In simulink I made a simple block and generating a visual C++ code using a target file : grt.tlc ----- (Creating a visual c++ solution file for the grt target. During Build process I am getting an error like:
'No supported Visual C/C++ compiler found. Check your installation of Visual C/C++.'
But still it is genearting some code. But this error is really annoying me. On the other side, in matlab command window, it shows like:
''### Real-Time Workshop build procedure for model: 'convFactor2' aborted due to an error.''
By seeing this I feel that, the genearted code is not completly build because when I then launch it on VC++ itself I get errors from simulink header files (particularly on simstruc.h).
However when I type command "mex -setup" it shows both the lcc compiler and VC++ compiler. I have thus chosen the VC++ compiler but still get the same error as explained previously.
So, how do I get the RTW to recognize the VC++ compiler?
Note:I am using Matlab R 2010b and Microsoft Visual C++ 2010 express edition and also I have installed microsoft SDK.
Thanks in advance

2 comentarios

What happens when you run "mex.getCompilerConfigurations" at the command prompt?
I get the following info....
>> mex.getCompilerConfigurations
ans =
mex.CompilerConfiguration
Package: mex
Properties:
Name: 'Microsoft Visual C++ 2010 Express'
Manufacturer: 'Microsoft'
Language: 'C++'
Version: '10.0'
Location: 'C:\Program Files\Microsoft Visual Studio 10.0'
Details: [1x1 mex.CompilerConfigurationDetails]

Iniciar sesión para comentar.

 Respuesta aceptada

Mark
Mark el 23 de Mzo. de 2011
I believe that this occurs if you are using Visual Studio Express. When Simulink creates a VS solution/project, it actually does it through some COM/ActiveX interface that is only present on Visual Studio Professional Edition. As a result, you can't make Visual Studio solutions/projects with the Express Edition.

6 comentarios

@Ajay: Just to explain the implications of Mark's answer, it looks like you've selected GRT target to generate an MSVC solution (it's the second grt.tlc option in the System Target File list from the Config Params Window) - this apparently needs the VS Prof. Edition. So you could either switch to grt.tlc (option 1 - which directly produces an EXE without generating a VS project), or get the Professional edition.
@Mark & @Govind:
Thank you guys. I got the same solution from mathworks support in mean time. Well, now I am gonna try with VC++ professional. Hope that works.
In the following link it shows that there is no diff between VC++2010 express and professional editions. So I think Mathworks need to update that page stating vc++2010 express compiler can't build using GRT target to genarte MSCV solution....
http://www.mathworks.com/support/compilers/R2010b/win64.html
Ajay: Since you are already in contact with Tech Support - could you please have them put in an enhancement request to update the documentation? They will be able to handle your request more appropriately. Thank you!
I have Visual Studio Professional 2010 (evaulation trial) installed and I can't create any Visual C++ Solution File (grt.tlc, ert.tlc or grt_malloc.tlc) with the Visual C++ complier. I've selected mex to the Visual C++ 2010 Professional complier package. I got the exactly same error "No supported Visual C/C++ compiler found. Check your installation of Visual C/C++." when trying to build RTW. Can anyone help me?
If you're on a 64-bit machine, you might need to install the x64 Compilers and Tools package at the time of installing Visual Studio. Also, when you run "mex -setup", make sure that the utility can automatically locate the installed compiler. If you have to specify it manually, there's something wrong with your compiler setup. Also, make sure that your version of MATLAB supports that version of Visual Studio: http://www.mathworks.com/support/sysreq/previous_releases.html (last column)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Preguntada:

el 22 de Mzo. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by