What's the problem with mex compiler when running simulation in accelerator mode Matlab 2015b

조회 수: 1 (최근 30일)
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.
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? I can send you the complete compilation log if needed.
Thank you.
  댓글 수: 2
Walter Roberson
Walter Roberson 2016년 1월 29일
That is odd. That is a problem that is associated with Windows 98 and earlier.
Torsten Knodt
Torsten Knodt 2016년 4월 6일
I have the same on 2016A using the acceleration mode. Due to the line I see on my computer directly before the error message you give I can see that it tries to access "D:\Program" instead of "D:\Program Files". So I guess the cause is a missing escaping of spaces in the path of the compiler (I my case Visual Studio 14.0 Express). I am working on a Windows 7 64 Bit machine.

댓글을 달려면 로그인하십시오.

답변 (1개)

Abhisek Roy
Abhisek Roy 2016년 2월 4일
Hi Alexandre,
It looks like the issue is caused by the environment variable PATH being corrupted. Try to build the following model -
>>open_system('xpcosc')
and look for the "devnull.2" file in the generated folder "xpcosc_slrt_rtw". If this the problem the file will have multiple lines stating: "'REG' is not an internal or external command, executable program or batch file."
To further confirm an issue with the PATH environment variable, open a Windows Command Prompt and type: "REG /?". Normally, it will display all the usages of the "REG" command. If different behavior is encountered, try the following:
Append the following to the PATH environment variable: C:\Windows\System32
This is the location of the "reg.exe". Adding this location to the PATH environment variable will resolve the issue.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by