OpenCV:链接:致命错误LNK1104:无法打开文件'opencv_haartraining_engined.lib' [英] OpenCV: LINK : fatal error LNK1104: cannot open file 'opencv_haartraining_engined.lib'
问题描述
我是OpenCV的新手,我尝试了一些故障排除方法,以尝试编译我的标头,但继续遇到链接器错误.
I'm new to OpenCV and I've tried some troubleshooting with trying to get my headers to compile but keep running into Linker Errors.
这是我要运行的代码:
//Visual Studio
#include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <math.h>
//LabView
//#include <NIVision.h>
//Opencv
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include "opencv2/opencv.hpp"
#include "opencv2/gpu/gpu.hpp"
这是我遇到的错误:
1>------ Rebuild All started: Project: Veni_Main, Configuration: Debug Win32 ------
1> stdafx.cpp
1> Veni_Main.cpp
1>c:\opencv\build\include\opencv2\flann\logger.h(66): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen'
1>LINK : fatal error LNK1104: cannot open file 'opencv_haartraining_engined.lib'
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
我已经为环境变量等添加了正确的路径.请指教!
I've already added the correct paths for the environmental variables and such. Please advise!
推荐答案
在遵循OpenCV教程时,我遇到了同样的问题.对我有用的是从链接器的其他依赖项列表中删除"opencv_haartraining_engined.lib".
I had the same issue while following an OpenCV tutorial. What worked for me was removing 'opencv_haartraining_engined.lib' from the list of additional dependencies for the linker.
要这样做:
- 右键单击项目
- 属性
- 将配置切换为所有配置"
- 扩展配置属性
- 展开链接器
- 选择输入
- 点击其他依赖项"下拉菜单,然后点击编辑"
- 删除"opencv_haartraining_engined.lib"行.
有可能已从较新的版本中删除了文件.
It's possible that file was removed from more recent releases.
这篇关于OpenCV:链接:致命错误LNK1104:无法打开文件'opencv_haartraining_engined.lib'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!