Why does MEX Compiler work in earlier versions of MATLAB but not in recent versions?
5 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2020 年 10 月 1 日
回答済み: MathWorks Support Team
2020 年 12 月 13 日
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?
採用された回答
MathWorks Support Team
2020 年 10 月 1 日
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!