报错 LINK : fatal error LNK1181: 无法打开输入文件“cxcore.lib”

vs2010报错:

1>LINK : fatal error LNK1181: 无法打开输入文件“cxcore.lib”

 

原因:opencv的版本问题,要添加进自己使用的版本的lib。

查看自己的lib目录:

比如:D:\Program Files\OPencv2.4.3\opencv\build\x86\vc10\lib

   

报错 LINK : fatal error LNK1181: 无法打开输入文件“cxcore.lib”_第1张图片

 

 

解决方法:

 

方法一:

在cpp文件中添加这两句:

#pragma comment( lib, "opencv_core243d.lib ")

#pragma comment( lib, "opencv_highgui243d.lib" )

 

方法二:

项目 -----> 属性 ----->

 

报错 LINK : fatal error LNK1181: 无法打开输入文件“cxcore.lib”_第2张图片

 

在Debug下的附加依赖项里添加:

opencv_calib3d243d.lib; opencv_contrib243d.lib;

opencv_core243d.lib;opencv_features2d243d.lib;

opencv_flann243d.lib; opencv_gpu243d.lib;opencv_highgui243d.lib;

opencv_imgproc243d.lib; opencv_legacy243d.lib;opencv_ml243d.lib;

opencv_objdetect243d.lib; opencv_ts243d.lib; opencv_video243d.lib

 

在Release下的附加依赖项里添加:

opencv_calib3d243.lib; opencv_contrib243.lib;

opencv_core243.lib;opencv_features2d243.lib; opencv_flann243.lib;

opencv_gpu243.lib;opencv_highgui243.lib; opencv_imgproc243.lib;

opencv_legacy243.lib; opencv_ml243.lib;opencv_objdetect243.lib;

opencv_ts243.lib; opencv_video243.lib

 

 

 

你可能感兴趣的:(error)