0

我的项目确实处于非常糟糕的境地。它适用于我的 32 位台式机以及相同版本的 MATLAB (R2012a) 和 Visual Studio 2010 Express,但不适用于 64 位笔记本电脑。最后一个错误如下:当我尝试执行此错误时:

function make_cvlib()
%  make_cvlib -- Make the cvlib_mex in windows. It probably will
%  work as well in Linux/Mac with only minor changes
%
%  Author:  Joaquim Luis
%  Date:    07-Sept-2006


% Adjust for your own path
INCLUDE_CV = '''C:\Program Files\OpenCV\cv\include''';
INCLUDE_CXCORE = '''C:\Program Files\OpenCV\cxcore\include''';
LIB_CV = '''C:\Program Files\OpenCV\lib\cv.lib''';
LIB_CXCORE = '''C:\Program Files\OpenCV\lib\cxcore.lib''';

% -------------------------- Stop editing ---------------------------
include_cv = ['-I' INCLUDE_CV ' -I' INCLUDE_CXCORE];
library_cv = [LIB_CV ' ' LIB_CXCORE];

if (ispc)
    opt_cv = '-O -DWIN64 -DDLL_CV100 -DDLL_CXCORE100';
else
    opt_cv = '-O';
end

cmd = ['mex cvlib_mex.c' ' ' include_cv ' ' library_cv ' ' opt_cv];        
eval(cmd)

这是错误:

>> make_cvlib
   Creating library C:\Users\hp\AppData\Local\Temp\mex_cj81oV\templib.x and object C:\Users\hp\AppData\Local\Temp\mex_cj81oV\templib.exp 
cvlib_mex.obj : error LNK2019: unresolved external symbol cvAddS referenced in function cvSubS 
cvlib_mex.obj : error LNK2019: unresolved external symbol cvEllipse referenced in function cvEllipseBox 
cvlib_mex.obj : error LNK2019: unresolved external symbol cvSetData referenced in function localSetData 
cvlib_mex.obj : error LNK2019: unresolved external symbol cvGetSeqElem referenced in function JapproxPoly 
cvlib_mex.obj : error LNK2019: unresolved external symbol cvReleaseMemStorage referenced in function JapproxPoly 
...(65 more)
cvlib_mex.mexw64 : fatal error LNK1120: 69 unresolved externals 

  C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Link of 'cvlib_mex.mexw64' failed. 

Error using mex (line 206)
Unable to complete successfully.

Error in make_cvlib (line 26)
eval(cmd)

请显示我错过的一些要点...

4

0 回答 0