mbuild setup fails / crashes, while mex setup works / succeeds / passes in 2017a windows 7
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
adam honse
am 26 Okt. 2017
Kommentiert: Harsheel
am 15 Nov. 2017
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 Kommentare
Akzeptierte Antwort
Ankitha Kollegal Arjun
am 30 Okt. 2017
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 Kommentare
Harsheel
am 15 Nov. 2017
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 .
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support for MinGW-w64 C/C++ Compiler finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!