mex 编译错误: 无法识别的开关: -cxx
mex compile error: Unrecognized switch: -cxx
编译 mex 文件 a 时会出现上述错误。我将MATLAB2013与 mex 编译器一起使用:Microsoft SDK 7.1 。我希望编译器打印的以下调试信息可能有用:
vl_compilenn: * Compiler and linker configurations *
vl_compilenn: intermediate build products directory:
C:Dima Projects_C Librariesmatconvnetmatlabmex.build
vl_compilenn: MEX files: C:DimaProjects_CLibrariesmatconvnetmatlab
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:DimaProjects_CLibrariesmatconvnetmatlab
mex.build matlabsrcvl_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~1MATLABR2013ABINMEX.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。
相关文章:
- 既然存在危险,为什么项目要使用-I include开关
- xmake总是报告:错误:无法获取cxx的程序,为什么
- 为什么这个音频包络不能通过开关的情况?
- 有人知道为什么在开关中使用stoi函数会返回恒定的错误吗
- C 和 C++ 中开关语句的案例标签的常量值,但显示不同的行为
- 在 c++ 中在开关情况下使用和不使用"break"时的不同输出
- 为什么我的开关/机箱在使用枚举时默认?
- 为什么布尔开关语句有编译器警告?
- 如何使用"equal to"以外的评估编写开关语句
- 为什么开关的优化方式与 c/c++ 中的链接不同?
- 无法找到简单的开关大小写枚举错误
- 未达到的情况会影响开关外壳性能
- C++:我的开关盒循环转到第一种情况
- 有没有办法在C++将字符串与开关语句一起使用?
- 开关:无外壳中断
- 在 Julia 中使用 boost 库和 Windows 上的 Cxx.jl
- 带有开关语句的 do-while 循环 -- 无穷循环错误
- 将编译器开关添加到 Eclipse CDT 内置编译器设置生成?
- Cxx.jl 在 Julia Complex 和 std::complex 之间进行转换
- mex 编译错误: 无法识别的开关: -cxx