Real time simulink build error

조회 수: 8 (최근 30일)
Rajashree Ravi
Rajashree Ravi 2017년 10월 11일
댓글: Peter Bouten 2020년 9월 23일
I am trying to build the example ex_slrt_rt_osc for real time Simulink and am getting the following error '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VCVarsQueryRegistry.bat"' is not recognized as an internal or external command,operable program or batch file. I have the already installed the Visual C compiler required for this and cannot resolve this error on my own. Any immediate help is much appreciated.

답변 (1개)

Prashant Arora
Prashant Arora 2017년 10월 16일
Hi Rajashree,
This issue can occur if your machine does not have appropriate permissions to edit the registry. The Microsoft Visual Studio compilers are configured in such a way that they require the ability to query the system registry using "reg.exe". The compiler uses configuration batch files "vcvarsall.bat", "vcvars64.bat", and "VCVarsQueryRegistry.bat" that call the "reg query" command to query the registry for the paths of different components.
To verify that this is the cause, you can try the following:
(1) Open a Windows Command Prompt window (press Windows Key + R, type in "cmd" in the field that appears, and press "Enter")
(2) Enter the following commands, one-by-one, to query the registry:
reg query "HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "14.0"
reg query "HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v "14.0"
reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "14.0"
reg query "HKCU\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7" /v "14.0"
If the output of each command shows:
"ERROR: Registry editing has been disabled by your administrator."
then this confirms that this is a permissions issue. You can work with your IT administrators to change the permissions and/or "Group Policy" to allow the "reg query" commands on your machine. Obtaining sufficient permission should then allow the batch files to execute successfully.
  댓글 수: 1
Peter Bouten
Peter Bouten 2020년 9월 23일
This item appears to be still valid for Simulink Real Time 2019b with Visual Studio 14.27 running without admin rights.
I get the error:
### Linking ... link /NOLOGO /DLL /SUBSYSTEM:CONSOLE /DEF:xpcvcdll.def /Include:_malloc /MAP /DEBUG /IGNORE:4099 C:\PROGRA~1\MATLAB\R2019b\toolbox\rtw\targets\xpc\target\build\lib\libatlas.a C:\PROGRA~1\MATLAB\R2019b\toolbox\rtw\targets\xpc\target\build\lib\libcblas.a xpcruntime.lib C:\ProgramData\Speedgoat\speedgoatlib\R2019b\9.1.0\sg_blocks\common\libsg\libsg_MSVC160_vc.lib D:\AppData\boutenp1\workspace\SpeedGoat_Repo\IHECU_GEN2_WorkSpace\codegen\slprj\slrt\_sharedutils\instrumented\rtwshared.lib xpctarget.obj appmappingData.obj legacy_stdio.obj @SpeedGoat_HostModel.rsp @SpeedGoat_HostModel_ref.rsp -out:SpeedGoat_HostModel_slrt.dll libucrt.lib(exit.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\link.EXE"' : return code '0x458' Stop. The make command returned an error of 2
The build process appears to use the VCVARSALL.BAT x86, which looks like it ran succesfull:
When I start Matlab with admin rights the build is succesfull.

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

카테고리

Help CenterFile Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by