Unable to replace MINGWROOT with Microsoft SDK 7.1 for matlab compiler

1 view (last 30 days)
I am using MATLAB 2015b. I have uninstalled MINGW compiler and successfully installed microsoft SDK 7.1 in windows 10 machine. When I run mex -setup I can see MS SDK7.1 and VS C++ 2010 being detected.
However when I try to build a simulink model with canoe interface, I get an error:
### Writing source file rtGetInf.c ### Writing header file rtGetNaN.h ### Writing source file rtGetNaN.c ### TLC code generation complete. . ### Processing Template Makefile: C:\Program Files\MATLAB\R2015b\rtw\c\canoe\cn_msdll.tmf ### sim_test.mk which is generated from C:\Program Files\MATLAB\R2015b\rtw\c\canoe\cn_msdll.tmf is up to date ### Building sim_test: .\\sim_test.bat
H:\Documents\canoe_simulink_intergration\sim_test_cn_rtw>set WINSDK_71A=
H:\Documents\canoe_simulink_intergration\sim_test_cn_rtw>cd .
H:\Documents\canoe_simulink_intergration\sim_test_cn_rtw>call "$MINGWROOT\VC\vcvarsall.bat" x86 The system cannot find the path specified.
At this point I am unable to find a solution. I appreciate any help!
Thanks in advance.
  4 Comments
Ming Yue
Ming Yue on 12 Oct 2018
I have VS 2017 on my machine and I noticed that "vcvarsall.bat" is also under C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build. It seems that the batch file is looking for the same resource in mingw's root folder. Is there a way to point to your VS instead?
Also, in your Simulink model, you can open the "Model Configuration Parameters" -> "Code Generation". Please check in each subcategories to see if you selected the right compiler. Especially, check if MinGW is selected in the Toolchain settings.
Suvrat Ramasubramanian
Suvrat Ramasubramanian on 12 Oct 2018
So I had to delete the mingw object library in the matlab root folder : C:\Program Files\MATLAB\R2015b\extern, where the microsoft sdk library is also installed. Strangely, this did the job. Anyway, in my case I did not want to do anything with mingw so uninstalling it and deleting all the folder made way for microsoft batch file.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!