mbuild setup fails / crashes, while mex setup works / succeeds / passes in 2017a windows 7
조회 수: 2 (최근 30일)
이전 댓글 표시
Howdy, Trying to make an s-function outside of matlab, and the mingw make utility is citing "undefined reference : mxGetPr" in simulink files as an example. So I'm trying to make sure i have all the includes and libs, and options setup for the make to work. After a few hours of research the mbuild script was brought to my attention. Looking at its xml for make file options, it looks like what i need. But long story short i was attempting to use mbuild but the -setup switch keeps failing. Even though a supported compiler is found... by mex!
>> mbuild -setup Error using mbuild (line 164) Unable to complete successfully. No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
>> getenv('MINGWROOT')
ans =
'C:\MinGW\'
>> mex -setup MEX configured to use 'MinGW64 Compiler (C)' for C language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. You will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
To choose a different language, select one from the following: mex -setup C++ mex -setup FORTRAN
MEX configured to use 'MinGW64 Compiler (C++)' for C++ language compilation. Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. You will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
>> getenv('MW_MINGW64_LOC')
ans =
'C:\MinGW\'
댓글 수: 0
채택된 답변
Ankitha Kollegal Arjun
2017년 10월 30일
The error message 'You can install the freely available MinGW-w64 C/C++ compiler...' is misleading. As of R2015b, the free compiler supported for deployment is Windows SDK 7.1. MinGW is supported only with MEX. Please install the Windows SDK 7.1 if you would like to use mbuild.
댓글 수: 2
Harsheel
2017년 11월 15일
just to clarify, you CAN use the MinGW 5.3.0 compiler in R2017b with "both" MEX and MBUILD. From R2015b to R2017a, MBUILD did not support MinGW compiler though. Also, Windows SDK 7.1 is unsupported as of R2017b. The latest compilers that are supported with MathWorks products can be found here .
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!