Why minGW not work as expected?
Show older comments
I download minGW form https://github.com/mathworks/MinGW_53 and configure it with matlab the output of 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:
https://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
if true
% code
end
But when I test it at a previous code(.cpp) which is correctly compiled I received the error
In function 'void mexFunction(int, mxArray**,
int, const mxArray**)':
C:\Users\User\Desktop\t\private\edgesDetectMex.cpp:99:63: error: cannot convert 'const int*' to
'const mwSize* {aka const long long unsigned int*}' for argument '2' to 'mxArray*
mxCreateNumericArray_730(mwSize, const mwSize*, mxClassID, mxComplexity)'
pl[0] = mxCreateNumericArray(3,outDims,mxSINGLE_CLASS,mxREAL);
If I correctly configured minGW or not? and if not what is the wrong?
2 Comments
samar mahmoud
on 16 Apr 2018
Jonas Svedberg
on 25 Apr 2018
Same happens to me " Undefined variable "mex_spkg" or class "mex_spkg.getEnvVarName".
Error in configuremingw"
Using 2017b
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!