Error when referencing a model
11 views (last 30 days)
Show older comments
Hi,
When I am trying to run the basic model of referenced model (sldemo_mdlref_basic) I am getting below error.
>> sldemo_mdlref_basic
### Model reference SIM target (sldemo_mdlref_counter_msf.mexw64) for model sldemo_mdlref_counter is out of date because sldemo_mdlref_counter_msf.mexw64 does not exist
### Updating model reference SIM target for model: sldemo_mdlref_counter
'"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\..\..\VC\bin\vcvars64"' is not recognized as an internal or external command,
operable program or batch file.
'nmake' is not recognized as an internal or external command,
operable program or batch file.
The make command returned an error of 9009
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Real-Time Workshop build procedure for model: 'sldemo_mdlref_counter' aborted due to an error.
>>
Please help me. I am using MATLAB R2010b.
Thanks
Shambhu Sau
0 Comments
Answers (3)
Walter Roberson
on 27 Jun 2016
If you have not done so already, you need to install a recognized compiler. You can find the supported list at http://www.mathworks.com/support/sysreq/files/SystemRequirements-Release2010b_SupportedCompilers.pdf . It looks as if you might currently have a partial installation of VS 2010 Express; you might need to reinstall it.
Once you have installed the compiler, you need to use
mex -setup
to configure the compiler.
Once that is done, you should be able to load the model; it will need to recompile sldemo_mdlref_counter_msf for you automatically.
0 Comments
SHAMBHU SAU
on 27 Jun 2016
1 Comment
Walter Roberson
on 27 Jun 2016
Do not mex the .mdl, just use
sldemo_mdlref_basic
and it should build the .mexw64 for you.
SHAMBHU SAU
on 27 Jun 2016
1 Comment
Walter Roberson
on 27 Jun 2016
See http://stackoverflow.com/questions/1865069/how-to-compile-a-64-bit-application-using-visual-c-2010-express for additional steps you have to take to compile for 64 bits when you use the Visual C "Express" compilers.
See Also
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!