NMAKE : fatal error U1052: file 'slrttestmdl.mk' not found
7 次查看(过去 30 天)
显示 更早的评论
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"
0 个评论
采纳的回答
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
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
2018-10-25
It worked for "Error U1052: File 'ntwin32.mak' not found" as well. Thanks!
更多回答(3 个)
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.
0 个评论
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
0 个评论
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
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\tools\vctools.mak' not found ' ?
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 Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!