Compile Error ( MEX could not find the library )
2 views (last 30 days)
Show older comments
hi i'm using matlab 2013a x64 and win7 x64 . install the opencv path (C:\opencv)
Compile Error :
>> mex -LC:\opencv\build\x64\vc11\lib -IC:\opencv\build\include\opencv -lcv -lcxcore me_HaarDetectOpenCV.cpp
Warning: MEX could not find the library "cv" specified with -l option.
MEX looked for a file with one of the names:
cv.lib
libcv.lib
MEX looked for the library in the following directories:
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\LIB\amd64
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\LIB\amd64
C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64
D:\Program Files\MATLAB\R2013a\extern\lib\win64
D:\Program Files\MATLAB\R2013a\extern\lib\win64\microsoft
C:\opencv\build\x64\vc11\lib
Warning: MEX could not find the library "cxcore" specified with -l option.
MEX looked for a file with one of the names:
cxcore.lib
libcxcore.lib
MEX looked for the library in the following directories:
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\LIB\amd64
D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ATLMFC\LIB\amd64
C:\Program Files (x86)\Windows Kits\8.0\lib\win8\um\x64
D:\Program Files\MATLAB\R2013a\extern\lib\win64
D:\Program Files\MATLAB\R2013a\extern\lib\win64\microsoft
C:\opencv\build\x64\vc11\lib
Creating library C:\Users\AsUs\AppData\Local\Temp\mex_47j5SQ\templib.x and object C:\Users\AsUs\AppData\Local\Temp\mex_47j5SQ\templib.exp
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvCreateImage referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvReleaseImage referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvCreateMemStorage referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvReleaseMemStorage referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvGetSeqElem referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvLoad referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvEqualizeHist referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvReleaseHaarClassifierCascade referenced in function mexFunction
me_HaarDetectOpenCV.obj : error LNK2019: unresolved external symbol cvHaarDetectObjects referenced in function mexFunction
me_HaarDetectOpenCV.mexw64 : fatal error LNK1120: 9 unresolved externals
D:\PROGRA~2\MATLAB\R2013A\BIN\MEX.PL: Error: Link of 'me_HaarDetectOpenCV.mexw64' failed.
Error using mex (line 206)
Unable to complete successfully.
>>
how fix error and compile (created me_HaarDetectOpenCV.mexw64)??
2 Comments
Walter Roberson
on 14 Dec 2013
Could you confirm that libcv.lib or cv.lib are in C:\opencv\build\x64\vc11\lib ?
Accepted Answer
jafar
on 16 Dec 2013
1 Comment
Walter Roberson
on 16 Dec 2013
To check: you solved the problem? If so, would was the key change you needed to make?
More Answers (1)
Walter Roberson
on 15 Dec 2013
You do not have the cv library that it needs to link against, or else you have the library in a different directory.
Perhaps you downloaded opencv but did not tell it to compile itself.
1 Comment
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!