Why does MEX Compiler work in earlier versions of MATLAB but not in recent versions?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 1 Oct 2020
Réponse apportée : MathWorks Support Team
le 13 Déc 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?
Réponse acceptée
MathWorks Support Team
le 1 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Support for MinGW-w64 C/C++ Compiler dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!