MATLAB: NMAKE : fatal error U1052: file ‘slrttestmdl.mk’ not found

confidence test 4slrttestmdl.mk

I am running slrt on a target computer. When running slrttest, it fails at test 4. I checked the Matlab website for confidence test 4 errors. Our compiler is supported (Visual Studio Community 2017 C++) and our compiler path is in the standard path, but we are still getting the error below. I have not been able to find anybody else with this problem and I don't know where slrttestmdl.mk would be. I am working with 2017b. This is my first time posting so if I'm missing anything, let me know.
.
### Processing Template Makefile: C:\Program Files\MATLAB\R2017b\toolbox\slrt\rtw\slrt_vc.tmf
### slrttestmdl.mk which is generated from C:\Program Files\MATLAB\R2017b\toolbox\slrt\rtw\slrt_vc.tmf is up to date
### Building slrttestmdl: .\slrttestmdl.bat
C:\Users\mathewp\Downloads\slrttestmdl_slrt_rtw\instrumented>call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\VCVARSALL.BAT " x86
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26730.16
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'
Microsoft (R) Program Maintenance Utility Version 14.11.25508.2
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1052: file 'slrttestmdl.mk' not found
Stop.
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
Error(s) encountered while building "slrttestmdl"

Best Answer

Hi Alex,
One thing that you may try is to set the environment variable VSCMD_START_DIR in MATLAB. To do so, you can execute the following command in MATLAB Command Window:
>> setenv('VSCMD_START_DIR','%CD%')
Also you can put this in the start up file for MATLAB program, so that you don't have to execute this command every session.
Related Question