Hi everybody,
I've just upgraded Matlab from 2013a to 2015b and I have problem when compiling my model.
I have a model working perfectly on 2013a. I'm using compiler Lcc-win32 C 2.4.1 and my computer OS is windows 7 64-bits. In fact when entering >>mex -setup in matlab prompt command, this compiler is the only choice I have.
For Matlab 2015b, my default compiler is 'Microsoft Windows SDK 7.1 (C)' and I have Microsoft .NET Framework 4.5 installed. According to
http://www.mathworks.com/support/compilers/R2015b/index.html, I'm compliant.
In normal mode, I can run my simulation without problem but in Accelerator mode, I get this error :
'cmd' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cmd' : return code '0x1'
Stop.
How can I fix that? The complete log is pasted below.
Thank you.
_____________________________________________________________________
### Building the Accelerator target for model: Digital_Speed_Governor
### Generating code into build folder: C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor
### Invoking Target Language Compiler on Digital_Speed_Governor.rtw
### Using System Target File: C:\Program Files\MATLAB\R2015b\rtw\c\accel\accel.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
...............................................................................
............................................................................
### Caching model source code
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
...............................................................................
....
### Writing header file Digital_Speed_Governor_acc.h
.
### Writing header file Digital_Speed_Governor_acc_types.h
### Writing header file Digital_Speed_Governor_acc_private.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
### Writing header file rt_look1d.h
### Writing source file rt_look1d.c
.
### Writing header file rt_look.h
### Writing source file rt_look.c
### Writing source file Digital_Speed_Governor_acc.c
### Writing source file Digital_Speed_Governor_acc_data.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
.
### Writing header file rt_defines.h
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rtGetNaN.h
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Creating project marker file: rtw_proj.tmw
.
### Processing Template Makefile: C:\Program Files\MATLAB\R2015b\rtw\c\accel\accel_vcx64.tmf
### Creating Digital_Speed_Governor.mk from C:\Program Files\MATLAB\R2015b\rtw\c\accel\accel_vcx64.tmf
### Building Digital_Speed_Governor: .\Digital_Speed_Governor.bat
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/BLADE MAX LIMIT SP RAISE//LOWER': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/L65S1': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/L65S': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/POWER LIMIT SP RAISE//LOWER': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/WG MAX LIMIT SP L65PL': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/WG LIMIT SP RAISE//LOWER': File "spring_button.png" does not exist.
Warning: Could not evaluate MaskDisplay commands of block 'Digital_Speed_Governor/SC_UserInterface/HMI/MANUAL RAISE//LOWER': File "spring_button.png" does not exist.
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>call setup_mssdk71.bat
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set COMPILER=cl
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set COMPFLAGS=/c /GR /W3 /EHs /nologo /MD -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\simulink\include" /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set DEBUGFLAGS=/Z7
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set LINKER=link
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set LINKFLAGS=/nologo /manifest /export: /DLL /LIBPATH:"C:\Program Files\MATLAB\R2015b\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /EXPORT:mexFunction
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set LINKDEBUGFLAGS=/debug /PDB:".mexw64.pdb"
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set NAME_OUTPUT=/out:""
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Bin;;;C:\Program Files\MATLAB\R2015b\bin\win64;c:\opal-rt\rt-lab\v11.0.1.390\common\bin;;.;
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\\INCLUDE\gl;C:\Program Files\MATLAB\R2015b\extern\include;;
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set LIB=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\Lib\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\lib\win64;C:\Program Files\MATLAB\R2015b\extern\lib\win64;
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>set LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Lib\amd64;C:\Program Files\Microsoft SDKs\Windows\v7.1\\LIB\X64;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\LIB\AMD64;C:\Program Files\MATLAB\R2015b\extern\lib\win64;
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>cd .
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>nmake -f Digital_Speed_Governor.mk ISPROTECTINGMODEL=NOTPROTECTING
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
'cmd' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cmd' : return code '0x1'
Stop.
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>echo The make command returned an error of 2
The make command returned an error of 2
C:\Test_Matlab2015\slprj\accel\Digital_Speed_Governor>An_error_occurred_during_the_call_to_make
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
### Build procedure for model: 'Digital_Speed_Governor' aborted due to an error.
Error: Error(s) encountered while building "Digital_Speed_Governor"
Error: Problem creating Accelerator MEX file for model 'Digital_Speed_Governor'.
Caused by:
Error(s) encountered while building "Digital_Speed_Governor"
_____________________________________________________________________