osx - MATLAB linking wrong OpenCV folder (OS X) -
osx - MATLAB linking wrong OpenCV folder (OS X) -
i'm running matlab code (opentld) calls opencv, appears have duplicates of of dylibs confusing matlab.
__zn2cv13algorithminfo8addparamerns_9algorithmepkcrbbms1_fivems1_fvierknst3__112basic_stringicnsa_11char_traitsiceensa_9allocatoriceeee referenced from: /usr/local/lib/libopencv_superres.2.4.dylib expected in: /applications/matlab_r2014a.app/bin/maci64/libopencv_core.2.4.dylib in /usr/local/lib/libopencv_superres.2.4.dylib
i have libopencv dylibs thinks should be.
this relevant part of compilation:
include = ' -i/usr/local/include/opencv/ -i/usr/local/include/'; libpath = '/usr/local/lib/'; files = dir([libpath 'libopencv*.dylib']); lib = []; = 1:length(files), lib = [lib ' ' libpath files(i).name]; end eval(['mex lk.cpp -o' include lib]);
my current thought create soft link, think mess other opencv stuff outside of matlab.
try seting dyld_insert_libraries
environment variable before starting matlab forcefulness utilize local libraries instead of own. like:
dyld_insert_libraries=/usr/local/lib/libopencv_2.4.dylib /applications/matlab_r2014a.app/bin/matlab
use ldd
(or osx equivalent otool
) both within , outside matlab find shared libraries source of conflict. compare output of these two:
% in matlab command window >> !ldd ./some_mex_file.mex*
and
# in scheme shell $ ldd ./some_mex_file.mex*
osx matlab opencv mex conflicting-libraries
Comments
Post a Comment