gcc - Error compiling Matlab MEX files (Piotr's Matlab Toolbox) -



gcc - Error compiling Matlab MEX files (Piotr's Matlab Toolbox) -

i trying install piotr's matlab toolbox (http://vision.ucsd.edu/~pdollar/toolbox/doc/) compile script mex files complains:

>> toolboxcompile compiling....................................... warning: using gcc version "4.6.3-1ubuntu5)". version supported mex "4.2.3". list of supported compilers see: http://www.mathworks.com/support/compilers/current_release/ /usr/bin/ld: cannot find -lstdc++ collect2: ld returned 1 exit status mex: link of ' "/home/josh/desktop/project/code/toolbox/images/private/assigntobins1.mexglx"' failed. ??? error using ==> mex @ 222 unable finish successfully. error in ==> toolboxcompile @ 36 i=1:length(fs), mex([fs{i} '.c'],opts{:},[fs{i} '.' mexext]); end

how go resolving issue?

before compile mexfiles in matlab need configure mex compiler.

in matlab, type:

>> mex -setup

matlab automatically detects compilers have installed on machine , allows pick 1 of them. on linux machines should utilize gcc compiler.

another thing must take care of create sure environment variable $ld_library_path points machine's libraries installed. in matlab may type:

>> getenv('ld_library_path')

and create sure correct.

try editing toolboxcompile.m , add together -v mex compilation command more verbose info on compilation.

matlab gcc ubuntu mex

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -