NMAKE : fatal error U1052: file 'slrttestmdl.mk' not found

조회 수: 5 (최근 30일)
Alex  Harpenau
Alex Harpenau 2017년 10월 6일
댓글: Stefanie Schwarz 2022년 8월 29일
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"

채택된 답변

Suze Zhang
Suze Zhang 2017년 10월 10일
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.
  댓글 수: 2
Raphaël Ollivier
Raphaël Ollivier 2017년 10월 28일
Excellent ! That fix worked for me, under r2017a, with both Visual C++ 2017 (15.0) and Visual C++ 2015 (14.0). Thanks a lot !
Adrian Roguski
Adrian Roguski 2018년 10월 25일
It worked for "Error U1052: File 'ntwin32.mak' not found" as well. Thanks!

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

추가 답변 (3개)

Mathew Peterson
Mathew Peterson 2017년 10월 12일
Hi Suze Zhang, Thanks for answering our question is such a timely manner. When I attempted to use that command though I got an error. So I looked online to find someone with a similar error, there was one who had a similar question asked by Keith Lewis but it was never answered and I couldn't find much on google.
The call to slrt_make_rtw_hook, during the exit hook generated the following error:
Cannot write to destination: C:\Users\mathewp\Downloads\slrttestmdl.mldatx. Use the 'f' option to override.
The build process will terminate as a result.
Caused by:
Cannot write to destination: C:\Users\mathewp\Downloads\slrttestmdl.mldatx. Use the 'f' option to override.

Mathew Peterson
Mathew Peterson 2017년 10월 13일
We fixed this by using the copyfile command:
copyfile myfile1.m myFolder
The copyfile command is making a folder with a myfile.m

guang liu
guang liu 2021년 1월 16일
Hi, Alex and guys:
I met the similar troubles when I compile the model as dll file, the error is as follows, Can you give me some advices,thanks a lot.
Using Microsoft Windows SDK for Windows 7 (7.1.7600.0.30514) C:\Users\lenovo\Documents\MATLAB\untitled_niVeriStand_rtw>cd /d C:\Users\lenovo\Documents\MATLAB\untitled_niVeriStand_rtw\ C:\Users\lenovo\Documents\MATLAB\untitled_niVeriStand_rtw>nmake -f untitled.mk MATLAB_ROOT=D:\Program Files\MATLAB\R2018b ALT_MATLAB_ROOT=D:\Program Files\MATLAB\R2018b MATLAB_BIN= ALT_MATLAB_BIN= EXT_MODE=0 EXTMODE_STATIC_ALLOC=0 TMW_EXTMODE_TESTING=0 EXTMODE_STATIC_ALLOC_SIZE=1000000 EXTMODE_TRANSPORT=0 MAT_FILE=1 NIDEBUG=0 NIOPT="Default" OPTS="" COMBINE_OUTPUT_UPDATE_FCNS=0 INCLUDE_MDL_TERMINATE_FCN=1 MULTI_INSTANCE_CODE=0 ISPROTECTINGMODEL=NOTPROTECTING /I Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved. untitled.mk(139) : fatal error U1052: file 'D:\Program\rtw\c\tools\vctools.mak' not found Stop. C:\Users\lenovo\Documents\MATLAB\untitled_niVeriStand_rtw>echo The make command returned an error of 2 The make command returned an error of 2 C:\Users\lenovo\Documents\MATLAB\untitled_niVeriStand_rtw>An_error_occurred_during_the_call_to_make
  댓글 수: 3
hb zhao
hb zhao 2022년 1월 12일
hi guangliu, i've encountered the same problem. How did you solve the problem that ' fatal error U1052: D:\Program​\rtw\c\too​ls\vctools​.mak' not found ' ?
Stefanie Schwarz
Stefanie Schwarz 2022년 8월 29일
In your case, the problem seems to be related to the space character in "Program Files" since
D:\Program\rtw\c\tools\vctools.mak
is not the correct path to the "vctools.mak" file. It should be:
D:\Program Files\MATLAB\RXXXXx\rtw\c\tools\vctools.mak
(or similar, depending on where you have MATLAB installed on your system).
Please go through the suggestions in the following article:

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

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by