ntwin32.mak not found - R2018b w/ Visual Studio 2017 Pro

16 visualizzazioni (ultimi 30 giorni)
I am building for a target in R2108b (9.5.0.944444) with Microsoft Visual C++ 2017 (C) set up as my compiler. I have the Windows SDK v7 and v10 installed. The ntwin32.mak file is located where it should be in the include folder for the v7 SDK. When building the model it eventually aborts:
### Building FullEHStrRTW_Model: .\FullEHStrRTW_Model.bat
......
C:\Dater\FullEHStrCoSim_Subsys_v00\FullEHStrRTW_Model_dyn_rtw>set "VSCMD_START_DIR=C:\Dater\FullEHStrCoSim_Subsys_v00\FullEHStrRTW_Model_dyn_rtw"
C:\Dater\FullEHStrCoSim_Subsys_v00\FullEHStrRTW_Model_dyn_rtw>call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\VCVARSALL.BAT " amd64
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.15
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
Microsoft (R) Program Maintenance Utility Version 14.16.27032.1
Copyright (C) Microsoft Corporation. All rights reserved.
C:\PROGRA~1\MATLAB\R2018b\rtw\c\tools\vctools.mak(18) : fatal error U1052: file 'ntwin32.mak' 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.
I have reinstalled basically everything and still get stuck here. Any thoughts?

Risposte (3)

Fangjun Jiang
Fangjun Jiang il 27 Ago 2019
Run "mex -setup" and follow instructions.
  5 Commenti
Fangjun Jiang
Fangjun Jiang il 27 Ago 2019
In your "Code Generation" configurations, select the "Automatically located an installed toolchain" or try "MVC++2017 ... nmaker (64-bit Windows)"
Joshua Mason
Joshua Mason il 27 Ago 2019
I don't see any of those options anywhere within the "Code Generation" configurations.

Accedi per commentare.


Joshua Mason
Joshua Mason il 27 Ago 2019
I manually edited vctools.mak:
From:
!include <ntwin32.mak>
to:
!include C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\ntwin32.mak
and it will build fine. I have added the directory to the matlab path and the environments variable PATH and neither seem to allow the vctools.mak reference work.

Joshua Mason
Joshua Mason il 27 Ago 2019
Similarly if I add 17.0 to the or statement on Visual studio version check:
!if "$(VISUAL_VER)" == "11.0" || "$(VISUAL_VER)" == "12.0" || "$(VISUAL_VER)" == "14.0" || "$(VISUAL_VER)" == "15.0" || "$(VISUAL_VER)" == "17.0"
This will also result in a compiled .dll.

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by