Compile Error ( MEX could not find the library )
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Walter Roberson
2013-12-14
Could you confirm that libcv.lib or cv.lib are in C:\opencv\build\x64\vc11\lib ?
采纳的回答
jafar
2013-12-16
1 个评论
Walter Roberson
2013-12-16
To check: you solved the problem? If so, would was the key change you needed to make?
更多回答(1 个)
Walter Roberson
2013-12-15
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!