issues using MINGW 64 compiler
조회 수: 5 (최근 30일)
이전 댓글 표시
I have installed MINGW64 compiler and linked it to my matlab. So on running the command "mex -setup" i get the output as:
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. In the near future 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
Now when i try to compile the file "yprime.c" (generated using copyfile(fullfile(matlabroot,'extern','examples','mex','yprime.c'),'.','f') command as given in the documentation ) using the command "mex yprime.c" i get the following erroes
Building with 'MinGW64 Compiler (C)'. Error using mex C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x26): undefined reference to `mexErrMsgIdAndTxt' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x31): undefined reference to `mxGetM' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x3e): undefined reference to `mxGetN' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x4b): undefined reference to `mxIsDouble' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x5a): undefined reference to `mxIsComplex' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x83): undefined reference to `mexErrMsgIdAndTxt' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x97): undefined reference to `mxCreateDoubleMatrix_700' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0xa4): undefined reference to `mxGetPr' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0xb0): undefined reference to `mxGetPr' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0xbb): undefined reference to `mxGetPr' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x1eb): undefined reference to `mexErrMsgIdAndTxt' C:\Users\NaPsTeR\AppData\Local\Temp\mex_25702802873875_13176\yprime.obj:yprime.c:(.text+0x21c): undefined reference to `mexWarnMsgIdAndTxt' collect2.exe: error: ld returned 1 exit status
What is the cause of this error??? what should i do to remove this??
댓글 수: 0
답변 (1개)
rkl0026
2018년 12월 12일
I also had the problem before.
In the end it turns out that I have install MinGW64 Compiler (C) for 32bit Windows on my 64bit PC. You can have a try and hope it works.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!