gpt4 book ai didi

c++ - mex 编译错误 : Unrecognized switch: -cxx

转载 作者:行者123 更新时间:2023-11-28 02:28:53 25 4
gpt4 key购买 nike

编译mex文件时出现上述错误。我将 MATLAB2013 与 mex 编译器一起使用:Microsoft SDK 7.1。我希望编译器打印的以下调试信息可能有用:

vl_compilenn: * Compiler and linker configurations *
vl_compilenn: intermediate build products directory:
C:\Dima \Projects_C \Libraries\matconvnet\matlab\mex\.build
vl_compilenn: MEX files: C:\Dima\Projects_C\Libraries\matconvnet\matlab
\mex/
vl_compilenn: MEX compiler options: -DNDEBUG -D__SSSE3__ -cxx
vl_compilenn: MEX linker options: -lmwblas -lgdiplus
vl_compilenn: * Reading images *
vl_compilenn: vl_imreadjpeg enabled
vl_compilenn: image library: gdiplus
vl_compilenn: image library compile flags:
vl_compilenn: image library link flags: -lgdiplus
vl_compilenn: MEX: -outdir C:\Dima\Projects_C\Libraries\matconvnet\matlab
\mex\.build matlab\src\vl_imreadjpeg.cpp -c -DNDEBUG -D__SSSE3__ -cxx
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

Use the -help option for more information, or consult the MATLAB API Guide.


C:\PROGRA~1\MATLAB\R2013A\BIN\MEX.PL: Error: Unrecognized switch: -cxx

最佳答案

这是 -cxx MEX 命令行选项的帮助:

Command Line Options Available Only on UNIX Platforms:
-cxx
Use the C++ linker to link the mex-file if the first source file
is in C and there are one or more C++ source or object files. This
option overrides the assumption that the first source file in
the list determines which linker to use.

如您所见,它表示 -cxx 仅在 UNIX 平台上可用。我认为您不需要做任何特殊的事情来在 Windows 上编译 C++ MEX;只需像以前那样调用 mex,但不要使用 -cxx。

关于c++ - mex 编译错误 : Unrecognized switch: -cxx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29600987/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com