Error when referencing a model
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (3)
Walter Roberson
el 27 de Jun. de 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 comentarios
SHAMBHU SAU
el 27 de Jun. de 2016
1 comentario
Walter Roberson
el 27 de Jun. de 2016
Do not mex the .mdl, just use
sldemo_mdlref_basic
and it should build the .mexw64 for you.
SHAMBHU SAU
el 27 de Jun. de 2016
1 comentario
Walter Roberson
el 27 de Jun. de 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.
Ver también
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!