http://www.mathworks.com/matlabcentral/answers/169911-cpp-file-in-matlab

 

Hi,

you will need to tell mex where to find the include files, and probably also the library files. Your call should look something like

mex -I"C:\Program Files\opencv\include" Loadimage.cpp -l"C:\Program Files\opencv\lib" -Lopencv.lib

Take a look at the doc for mex and there at the flags "-I", "-L", "-l".

Titus

Posted by saveone

댓글을 달아 주세요