MATLAB中的Myo臂章手势(无法编译.m或.mex文件)

Myo armband gestures in MATLAB (Unable to compile the .m or .mex file)

本文关键字:编译 mex 文件 Myo 中的 MATLAB      更新时间:2023-10-16

我需要一些帮助来使myo-mex文件工作。我不知道如何更改编译器选项,以便mingw支持ISO c++ 2011。代码所在的github存储库可以在这里找到:https://github.com/mark-toma/MyoMex。我得到的错误信息如下所示:

Error using build_myo_mex (line 61)
In file included from C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-mingw32/4.9.2/include/c++/array:35:0,
             from C:MyoMex-masterMyoMexmyo_mexmyo_class.hpp:16,
             from C:MyoMex-masterMyoMexmyo_mexmyo_mex.cpp:14:
C:/MATLAB/SupportPackages/R2015b/MW_MinGW_4_9/lib/gcc/x86_64-w64-  mingw32/4.9.2/include/c++/bits/c++0x_warning.h:32:2: error: #error This
file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled
with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support for the 

我对这个错误有点无能为力,但我希望有人能帮助我,因为我不擅长使用MATLAB。

在错误信息中有提到

此支持目前是实验性的,必须使用-std=c++11-std=gnu++11编译器选项。

使用:

-std=c++11-std=gnu++11