Why does MEX Compiler work in earlier versions of MATLAB but not in recent versions?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 1 Okt. 2020
Beantwortet: MathWorks Support Team
am 13 Dez. 2020
I am trying to compile a 'C' mex function. This worked in earlier versions of matlab but with MATLAB R2020a, and the MinGW compiler, I am getting the following warnings and errors:
Error using mex
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
..\arObj\ar_open.obj:(.text[open_ar]+0xef): undefined reference to `__security_check_cookie'
..\arObj\ar_open.obj:(.xdata[$unwind$open_ar]+0x18): undefined reference to `__GSHandlerCheck'
..\arObj\flat_time.obj:(.text[ar_to_secs]+0xdc): undefined reference to
`__security_check_cookie'
..\arObj\flat_time.obj:(.xdata[$unwind$ar_to_secs]+0x8): undefined reference to
`__GSHandlerCheck'
collect2.exe: error: ld returned 1 exit status
Error in Make (line 36)
mex('-v', '-DWIN', ['-I' arSrcPath], 'asrch.c', …
How can I fix this?
Akzeptierte Antwort
MathWorks Support Team
am 1 Okt. 2020
To resolve this issue, please ensure all dependencies are compiled with the same compiler and version of MATLAB. When all dependencies are recompiled with the currently used version of Matlab and compiler, the application will be able to compile and run successfully.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support for MinGW-w64 C/C++ Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!