vl_compilenn 期间的 mex 错误
mex error during vl_compilenn
我正在尝试按照 here 所述安装 MatConvNet。当我 运行 vl_compilenn
时,出现以下错误:
>> vl_compilenn
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully. % ... repeated many times, then suddenly :
Error using mex
MEX cannot find library 'gdiplus' specified with the -l option.
MEX looks for a file with one of the names:
libgdiplus.lib
gdiplus.lib
Please specify the path to this library with the -L option.
Error in vl_compilenn>mex_link (line 456)
mex(mopts{:}) ;
Error in vl_compilenn (line 408)
mex_link(opts, objs, mex_dir, flags.link) ;
我如何安装这个库,或者做任何必要的事情来消除这个错误?
我在 64 位上使用 MATLAB R2015b Windows 7。我也成功地 运行 混合了一些其他文件,但我很确定这个库 (MatConvNet) 可以没有大的错误,所以我可能遗漏了一些微不足道但很重要的文件。但我不确定是什么。
感谢您的帮助!
编辑
当我尝试将 gdiplus.lib 复制到建议的位置时,出现了不同的错误:
...
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'MinGW64 Compiler (C)'.
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
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
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
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
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.text[?vlmxError@@YAXW4_VlmxErrorId@@PEBDZZ]+0x178):
undefined reference to `__security_check_cookie'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$?vlmxError@@YAXW4_VlmxErrorId@@PEBDZZ]+0xc):
undefined reference to `__GSHandlerCheck'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.text[?vlmxNextOption@@YAHQEAPEBUmxArray_tag@@HPEBU_vlmxOption@@PEAHPEAPEBU1@@Z]+0x239):
undefined reference to `__security_check_cookie'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$?vlmxNextOption@@YAHQEAPEBUmxArray_tag@@HPEBU_vlmxOption@@PEAHPEAPEBU1@@Z]+0x10):
undefined reference to `__GSHandlerCheck'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$mexFunction]+0x1c):
... and thousands of lines like this :)
collect2.exe: error: ld returned 1 exit status
Error in vl_compilenn>mex_link (line 456)
mex(mopts{:}) ;
Error in vl_compilenn (line 408)
mex_link(opts, objs, mex_dir, flags.link) ;
编辑 2
这加上选择 Microsoft Windows SDK 7.1 (C) 作为 mex 编译器解决了这个问题。
我今天在使用 MATLAB R2015b 时遇到了同样的问题。我通过在我的 Matlab 安装目录 ("C:\Program Files\MATLAB\R2015b\sys\lcc64\lcc64\lib64") 中搜索 'gdiplus.lib' 文件,然后将其复制到 MATLAB 安装目录 ("C:\Program Files\MATLAB\R2015b\extern\lib\win64") 中的以下位置来修复此错误。
我正在尝试按照 here 所述安装 MatConvNet。当我 运行 vl_compilenn
时,出现以下错误:
>> vl_compilenn
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully. % ... repeated many times, then suddenly :
Error using mex
MEX cannot find library 'gdiplus' specified with the -l option.
MEX looks for a file with one of the names:
libgdiplus.lib
gdiplus.lib
Please specify the path to this library with the -L option.
Error in vl_compilenn>mex_link (line 456)
mex(mopts{:}) ;
Error in vl_compilenn (line 408)
mex_link(opts, objs, mex_dir, flags.link) ;
我如何安装这个库,或者做任何必要的事情来消除这个错误?
我在 64 位上使用 MATLAB R2015b Windows 7。我也成功地 运行 混合了一些其他文件,但我很确定这个库 (MatConvNet) 可以没有大的错误,所以我可能遗漏了一些微不足道但很重要的文件。但我不确定是什么。
感谢您的帮助!
编辑
当我尝试将 gdiplus.lib 复制到建议的位置时,出现了不同的错误:
...
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'MinGW64 Compiler (C)'.
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
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
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
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
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.text[?vlmxError@@YAXW4_VlmxErrorId@@PEBDZZ]+0x178):
undefined reference to `__security_check_cookie'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$?vlmxError@@YAXW4_VlmxErrorId@@PEBDZZ]+0xc):
undefined reference to `__GSHandlerCheck'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.text[?vlmxNextOption@@YAHQEAPEBUmxArray_tag@@HPEBU_vlmxOption@@PEAHPEAPEBU1@@Z]+0x239):
undefined reference to `__security_check_cookie'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$?vlmxNextOption@@YAHQEAPEBUmxArray_tag@@HPEBU_vlmxOption@@PEAHPEAPEBU1@@Z]+0x10):
undefined reference to `__GSHandlerCheck'
C:\MATLAB\matconvnet-1.0-beta16\matlab\mex\.build\vl_nnconv.obj:(.xdata[$unwind$mexFunction]+0x1c):
... and thousands of lines like this :)
collect2.exe: error: ld returned 1 exit status
Error in vl_compilenn>mex_link (line 456)
mex(mopts{:}) ;
Error in vl_compilenn (line 408)
mex_link(opts, objs, mex_dir, flags.link) ;
编辑 2
这加上选择 Microsoft Windows SDK 7.1 (C) 作为 mex 编译器解决了这个问题。
我今天在使用 MATLAB R2015b 时遇到了同样的问题。我通过在我的 Matlab 安装目录 ("C:\Program Files\MATLAB\R2015b\sys\lcc64\lcc64\lib64") 中搜索 'gdiplus.lib' 文件,然后将其复制到 MATLAB 安装目录 ("C:\Program Files\MATLAB\R2015b\extern\lib\win64") 中的以下位置来修复此错误。