LINK : fatal error LNK1104
今天本来想试试opencv的,于是就在自己的机子上部署一下试试,结果一直遇到这个错误:LINK : fatal error LNK1104
环境:win7 64位 vs2012 opencv 2.4.11
配置:
将E:\opencv\opencv\build\x64\vc12\bin添加到环境变量path中
在vs中添加附加包含目录:E:\opencv\opencv\build\include E:\opencv\opencv\build\include\opencv E:\opencv\opencv\build\include\opencv2
在vs中添加附加库目录:E:\opencv\opencv\build\x86\vc12\lib
在vs中添加附加依赖项:
opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_flann2411d.lib
opencv_gpu2411d.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_ml2411d.lib
opencv_nonfree2411d.lib
opencv_objdetect2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_videostab2411d.lib
执行生成就是一直出那个错误: LINK : fatal error LNK1104: 无法打开文件“opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;”
看一下opcv库目录下,这三个文件都存在,无语了。
试了试直接把这三个库拷贝到项目目录下,在代码中添加#pragma仍然出现这个错误:LINK : fatal error LNK1104
想不明白,到底为什么???
--
又在vs2013里面试了一下,还是不行。好吧,我放弃了。