0

http://yaafe.sourceforge.net/manual/install.htmlから 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.
4

1 に答える 1

2

ライブラリの名前を mex に伝える必要があります。それは次のようなものでなければなりません

mex -v -L/usr/local/yaafe-v0.64/lib -I/usr/local/yaafe-v0.64/include/yaafe-core -l"YOUR_LIB_NAME_HERE" yaafemex.cpp

ここで、「YOUR_LIB_NAME_HERE」は対応するライブラリの名前です。(引用符なし)

于 2013-03-19T11:57:52.170 に答える