Why does MEX Compiler work in earlier versions of MATLAB but not in recent versions?

5 visualizaciones (últimos 30 días)
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?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 1 de Oct. de 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.

Más respuestas (0)

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by