Ask Your Question

Revision history [back]

OpenCV + Matlab error

Hi, I am trying to generate opencv MEX files in windows by using MinGw compiler. I have used opencv 3.3.1 and opencv_contrib 3.3.1 source codes. I have installed all dependencies of MATLAB and in configuration, MATLAB seems to be working.

Matlab:

mex: C:/Program Files/MATLAB/R2017a/bin/mex.bat

Compiler/generator: Working

But while compiling with MinGw, at 98% it generates an error( here is full compile message):

CMake Error at C:/opencv/extra/modules/matlab/compile.cmake:47 (message):

Failed to compile CamShift: MEX cannot find library 'opencv_dnn331'

specified with the -l option.

MEX looks for a file with one of the names:

libopencv_dnn331.lib

opencv_dnn331.lib

Please specify the path to this library with the -L option.

But I have checked the C++ library and bin folders, only .dll and .dll.a files are there. But here MEX programm is trying to access the .lib files which dont exist.

Is there any fix for this error? Please Help.