C++ mex c++;符号未找到

C++ mex c++;符号未找到,c++,undefined,mex,C++,Undefined,Mex,我试着使用yaafe图书馆。所有内容都已安装并在python中正常工作。但是,我希望使用matlab接口,并尝试使用以下命令编译提供的yaafemex.cpp: mex-v-L/usr/local/yaafe-v0.64/lib-I/usr/local/yaafe-v0.64/include/yaafe-core yaafemex.cpp 它给出了以下错误。谁能给我点启示吗 -> mexopts.sh sourced from directory (DIR = $MATLAB/bin)

我试着使用yaafe图书馆。所有内容都已安装并在python中正常工作。但是,我希望使用matlab接口,并尝试使用以下命令编译提供的yaafemex.cpp:
mex-v-L/usr/local/yaafe-v0.64/lib-I/usr/local/yaafe-v0.64/include/yaafe-core yaafemex.cpp
它给出了以下错误。谁能给我点启示吗

-> mexopts.sh sourced from directory (DIR = $MATLAB/bin)
   FILE = /home/eric/R2010A/bin/mexopts.sh
----------------------------------------------------------------
->    MATLAB                = /home/eric/R2010A
->    CC                    = gcc
->    CC flags:
         CFLAGS             = -ansi -D_GNU_SOURCE -fPIC -pthread -m32  -fexceptions -D_FILE_OFFSET_BITS=64
         CDEBUGFLAGS        = -g
         COPTIMFLAGS        = -O -DNDEBUG
         CLIBS              = -Wl,-rpath-link,/home/eric/R2010A/bin/glnx86 -L/home/eric/R2010A/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++
         arguments          =  -DMX_COMPAT_32
->    CXX                   = g++
->    CXX flags:
         CXXFLAGS           = -ansi -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pthread
         CXXDEBUGFLAGS      = -g
         CXXOPTIMFLAGS      = -O -DNDEBUG
         CXXLIBS            = -Wl,-rpath-link,/home/eric/R2010A/bin/glnx86 -L/home/eric/R2010A/bin/glnx86 -lmx -lmex -lmat -lm
         arguments          =  -DMX_COMPAT_32
->    FC                    = g95
->    FC flags:
         FFLAGS             = -fexceptions -fPIC
         FDEBUGFLAGS        = -g
         FOPTIMFLAGS        = -O
         FLIBS              = -Wl,-rpath-link,/home/eric/R2010A/bin/glnx86 -L/home/eric/R2010A/bin/glnx86 -lmx -lmex -lmat -lm
         arguments          =  -DMX_COMPAT_32
->    LD                    = g++
->    Link flags:
         LDFLAGS            = -pthread -shared -m32 -Wl,--version-script,/home/eric/R2010A/extern/lib/glnx86/mexFunction.map -Wl,--no-undefined
         LDDEBUGFLAGS       = -g
         LDOPTIMFLAGS       = -O
         LDEXTENSION        = .mexglx
         arguments          =  -L/usr/local/yaafe-v0.64/lib
->    LDCXX                 = 
->    Link flags:
         LDCXXFLAGS         = 
         LDCXXDEBUGFLAGS    = 
         LDCXXOPTIMFLAGS    = 
         LDCXXEXTENSION     = 
         arguments          =  -L/usr/local/yaafe-v0.64/lib
----------------------------------------------------------------


Warning: You are using gcc version "4.4.3-4ubuntu5.1)".  The version
         currently supported with MEX is "4.2.3".
         For a list of currently supported compilers see: 
         http://www.mathworks.com/support/compilers/current_release/

-> g++ -c  -I/usr/local/yaafe-v0.64/include/yaafe-core -I/home/eric/R2010A/extern/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -pthread  -DMX_COMPAT_32 -O -DNDEBUG  "yaafemex.cpp"

-> g++ -O -pthread -shared -m32 -Wl,--version-script,/home/eric/R2010A/extern/lib/glnx86/mexFunction.map -Wl,--no-undefined -o  "yaafemex.mexglx"  yaafemex.o  -L/usr/local/yaafe-v0.64/lib -Wl,-rpath-link,/home/eric/R2010A/bin/glnx86 -L/home/eric/R2010A/bin/glnx86 -lmx -lmex -lmat -lm

yaafemex.o: In function `readFeature(mxArray_tag*, YAAFE::Engine*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
yaafemex.cpp:(.text+0x15f): undefined reference to `YAAFE::Engine::getOutput(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
yaafemex.cpp:(.text+0x2c9): undefined reference to `YAAFE::InputBuffer::availableTokens()'
yaafemex.cpp:(.text+0x305): undefined reference to `YAAFE::InputBuffer::availableTokens()'
yaafemex.cpp:(.text+0x318): undefined reference to `YAAFE::InputBuffer::read(double*, int)'
yaafemex.cpp:(.text+0x320): undefined reference to `YAAFE::InputBuffer::availableTokens()'
yaafemex.cpp:(.text+0x32c): undefined reference to `YAAFE::InputBuffer::consumeTokens(int)'
yaafemex.o: In function `processBuffer(mxArray_tag*, YAAFE::Engine*, double*, int)':
yaafemex.cpp:(.text+0x45b): undefined reference to `YAAFE::Engine::reset()'
yaafemex.cpp:(.text+0x489): undefined reference to `YAAFE::Engine::getInput(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
yaafemex.cpp:(.text+0x51e): undefined reference to `YAAFE::DataBlock::preferedBlockSize()'
yaafemex.cpp:(.text+0x545): undefined reference to `YAAFE::OutputBuffer::write(double*, int)'
yaafemex.cpp:(.text+0x552): undefined reference to `YAAFE::Engine::process()'
yaafemex.cpp:(.text+0x562): undefined reference to `YAAFE::Engine::flush()'
yaafemex.cpp:(.text+0x574): undefined reference to `YAAFE::Engine::getOutputs()'
yaafemex.o: In function `processFile(mxArray_tag*, YAAFE::Engine*, char*)':
yaafemex.cpp:(.text+0x668): undefined reference to `YAAFE::AudioFileProcessor::AudioFileProcessor()'
yaafemex.cpp:(.text+0x697): undefined reference to `YAAFE::AudioFileProcessor::processFile(YAAFE::Engine&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
yaafemex.cpp:(.text+0x714): undefined reference to `YAAFE::Engine::getOutputs()'
yaafemex.cpp:(.text+0x7fb): undefined reference to `YAAFE::AudioFileProcessor::~AudioFileProcessor()'
yaafemex.cpp:(.text+0x80e): undefined reference to `YAAFE::AudioFileProcessor::~AudioFileProcessor()'
yaafemex.o: In function `mexFunction':
yaafemex.cpp:(.text+0x960): undefined reference to `YAAFE::ComponentFactory::instance()'
yaafemex.cpp:(.text+0x96f): undefined reference to `YAAFE::ComponentFactory::loadLibrary(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
yaafemex.cpp:(.text+0xb28): undefined reference to `YAAFE::DataFlow::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
yaafemex.cpp:(.text+0xc2c): undefined reference to `YAAFE::Engine::Engine()'
yaafemex.cpp:(.text+0xc5e): undefined reference to `YAAFE::Engine::load(YAAFE::DataFlow const&)'
collect2: ld returned 1 exit status

    mex: link of ' "yaafemex.mexglx"' failed.
->mexopts.sh来源于目录(DIR=$MATLAB/bin)
文件=/home/eric/r2100a/bin/mexopts.sh
----------------------------------------------------------------
->MATLAB=/home/eric/r2100a
->CC=gcc
->CC标志:
CFLAGS=-ansi-D_GNU_SOURCE-fPIC-pthread-m32-feexceptions-D_FILE_OFFSET_BITS=64
CDEBUGFLAGS=-g
COPTIMFLAGS=-O-DNDEBUG
CLIBS=-Wl,-rpath链接,/home/eric/R2010A/bin/glnx86-L/home/eric/R2010A/bin/glnx86-lmx-lmex-lmat-lm-lstdc++
参数=-DMX\u COMPAT\u 32
->CXX=g++
->CXX标志:
CXXFLAGS=-ansi-D_GNU_SOURCE-D_FILE_OFFSET_BITS=64-fPIC-pthread
cxdebugflags=-g
CXXOPTIMFLAGS=-O-DNDEBUG
CXXLIBS=-Wl,-rpath链接,/home/eric/R2010A/bin/glnx86-L/home/eric/R2010A/bin/glnx86-lmx-lmex-lmat-lm
参数=-DMX\u COMPAT\u 32
->FC=g95
->FC标志:
FFLAGS=-FEExceptions-fPIC
FDEBUGFLAGS=-g
FOPTIMFLAGS=-O
FLIBS=-Wl,-rpath链接,/home/eric/R2010A/bin/glnx86-L/home/eric/R2010A/bin/glnx86-lmx-lmex-lmat-lm
参数=-DMX\u COMPAT\u 32
->LD=g++
->链接标志:
LDFLAGS=-pthread-shared-m32-Wl,--version script,/home/eric/R2010A/extern/lib/glnx86/mexFunction.map-Wl,--no未定义
LDDEBUGFLAGS=-g
LDOPTIMFLAGS=-O
LDEXTENSION=.mexglx
参数=-L/usr/local/yaafe-v0.64/lib
->LDCXX=
->链接标志:
LDCxFlags=
ldcxdebugflags=
LDCxOptimFlags=
LDCXXEXTENSION=
参数=-L/usr/local/yaafe-v0.64/lib
----------------------------------------------------------------
警告:您正在使用gcc版本“4.4.3-4ubuntu5.1”。版本
目前MEX支持的是“4.2.3”。
有关当前支持的编译器的列表,请参阅:
http://www.mathworks.com/support/compilers/current_release/
->g++-c-I/usr/local/yaafe-v0.64/include/yaafe-core-I/home/eric/R2010A/extern/include-DMATLAB\u MEX\u文件-ansi-D\u GNU\u源-D\u文件\u偏移量\u位=64-fPIC-pthread-DMX\u COMPAT\u 32-O-DNDEBUG“yaafemex.cpp”
->g++-O-pthread-shared-m32-Wl,--version脚本,/home/eric/R2010A/extern/lib/glnx86/mexFunction.map-Wl,--no未定义-O“yaafemex.mexglx”yaafemex.O-L/usr/local/yaafe-v0.64/lib-Wl,-路径链接,/home/eric/R2010A/bin/glnx86-L/home/eric/R2010A/bin/glnx86-lmx-lmat-lm
o:在函数“readFeature(mxArray_tag*,YAAFE::Engine*,std::basic_string const&)”中:
yaafemex.cpp:(.text+0x15f):对“YAAFE::Engine::getOutput(std::basic_string const&)”的未定义引用
yaafemex.cpp:(.text+0x2c9):对“YAAFE::InputBuffer::availableTokens()”的未定义引用
yaafemex.cpp:(.text+0x305):对“YAAFE::InputBuffer::availableTokens()”的未定义引用
yaafemex.cpp:(.text+0x318):对“YAAFE::InputBuffer::read(double*,int)”的未定义引用
yaafemex.cpp:(.text+0x320):对“YAAFE::InputBuffer::availableTokens()”的未定义引用
yaafemex.cpp:(.text+0x32c):对“YAAFE::InputBuffer::consumeTokens(int)”的未定义引用
o:在函数“processBuffer(mxArray_标记*,YAAFE::Engine*,double*,int)”中:
yaafemex.cpp:(.text+0x45b):对“YAAFE::Engine::reset()”的未定义引用
yaafemex.cpp:(.text+0x489):对“YAAFE::Engine::getInput(std::basic_string const&)”的未定义引用
yaafemex.cpp:(.text+0x51e):对“YAAFE::DataBlock::preferedBlockSize()”的未定义引用
yaafemex.cpp:(.text+0x545):对“YAAFE::OutputBuffer::write(double*,int)”的未定义引用
yaafemex.cpp:(.text+0x552):对“YAAFE::Engine::process()”的未定义引用
yaafemex.cpp:(.text+0x562):对“YAAFE::Engine::flush()”的未定义引用
yaafemex.cpp:(.text+0x574):对“YAAFE::Engine::getOutputs()”的未定义引用
o:在函数“processFile(mxArray_tag*,YAAFE::Engine*,char*)”中:
yaafemex.cpp:(.text+0x668):对“YAAFE::AudioFileProcessor::AudioFileProcessor()”的未定义引用
yaafemex.cpp:(.text+0x697):对“YAAFE::AudioFileProcessor::processFile(YAAFE::Engine&,std::basic_string const&)”的未定义引用
yaafemex.cpp:(.text+0x714):对“YAAFE::Engine::getOutputs()”的未定义引用
yaafemex.cpp:(.text+0x7fb):对“YAAFE::AudioFileProcessor::~AudioFileProcessor()”的未定义引用
yaafemex.cpp:(.text+0x80e):对“YAAFE::AudioFileProcessor::~AudioFileProcessor()”的未定义引用
o:在函数'mexFunction'中:
yaafemex.cpp:(.text+0x960):对“YAAFE::ComponentFactory::instance()”的未定义引用
yaafemex.cpp:(.text+0x96f):对“YAAFE::ComponentFactory::loadLibrary(std::basic_string const&)”的未定义引用
yaafemex.cpp:(.text+0xb28):对“YAAFE::DataFlow::load(std::basic_string const&)”的未定义引用
yaafemex.cpp:(.text+0xc2c):对“YAAFE::Engine::Engine()”的未定义引用
yaafemex.cpp:(.text+0xc5e):对“YAAFE::Engine::load(YAAFE::DataFlow const&)”的未定义引用
collect2:ld返回了1个退出状态
mex:“yaafemex.mexglx”的链接失败。

您需要告诉mex库的名称。应该是这样的

mex-v-L/usr/local/yaafe-v0.64/lib-I/usr/local/yaafe-v0.64/include/yaafe-core-L“你的名字”yaafemex.cpp

其中“你的名字”是o的名字