Mode accelerator in Simulink and Windows 7 64-bits

Hi,... I have a model in Simulink which can run in normal model, however, in accelerator mode or real-time it doesn't work. It appears a message: "Unable to locate a Visual C/C++. Please define one of the following environment variables:Real-Time Workshop builds with Microsoft Visual C on 64-bit windows require that the compiler be installed". ... I have installed the newest version C++ compiler but I can't run the model yet.

 Accepted Answer

Run "mex -setup" from MATLAB command prompt and choose the installed compiler.
Note: Make sure you have a supported compiler.

8 Comments

I have installed 3 different compilers which are in the page you showed me, but when I run "mex-setup" in the command window appears "None".
What can I do?
It is likely you didn't get the Visual Studio x64 Compilers and Tools (by default, only the 32-bit compilers get installed even on a 64-bit machine). See this solution for installation details: http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L
Take a look of this:
"Sérgio Cruz" wrote in message <gt9kdh$hrv$1@fred.mathworks.com>...
> "Jeff Koechling" <jckoechling.no.spam@yahoo.no.spam.com> wrote in message <gt7nfh$j6m$1@fred.mathworks.com>...
> > Sergio,
> > Try setting environment variable VS80COMNTOOLS to the same value as VS90COMNTOOLS.
> > Jeff
> Jeff!
> It works!!!! Finally the accelerator is running in Simulink.
> Thanks a lot for your help! I owe you one :)
> Sergio
I think this is the solution, but I have another problem.
_____________________________________________________________________
Hi,
I have the same problem, I use Windows 7 64-bits, but I don't have VS80 neither VS90, I have VS100... What can I do to run accelerator mode??
Indira
What version of MATLAB are you using? It is best to get the supported compiler for that version (from list at http://www.mathworks.com/support/compilers/R2010b/win64.html). See the left panel for a "Support Compilers" under "Previous Releases" if you are using an older version. For example, R2010b does support VS 10.0. The restriction is because the mex options files are written for a subset of compiler versions. So if you are using an unsupported compiler, you will need to modify the mexopts file yourself.
I use Windows 7 64-bits, Matlab R2009a...
R2009a supports only Microsoft Visual C++ 2008 Express, which is the free version (full list here: http://www.mathworks.com/support/compilers/release2009a/) - I would recommend getting this version. Otherwise, you can create an options file for the newer version as described here: http://www.mathworks.com/matlabcentral/answers/1183-compiling-mex-files-with-visual-c-2010-with-matlab2009a
I've installed Microsoft Visual C++ 2008 Express... but it doesn't work... =(
I run mex -setup but nothing appears!!
It is possible that the environmental variables could be the solution??.. because it is related with the path..
Did you also follow instructions here to ensure that x64 compilers are installed (by default, only 32-bit compilers are installed): http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L

Sign in to comment.

More Answers (0)

Categories

Find more on Simulink Coder 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!