OpenCV: LINK: fatal error LNK1104: cannot open file 'opencv_haartraining_engined.lib'

I'm new to OpenCV, and I tried to troubleshoot by trying to collect my headers, but continue to work with linker errors.

Here is the code I want to run:

//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"

And here are the errors that I get:

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 have already added the correct paths for environment variables, etc. Please advise!

0
source share
3 answers

I had the same problem when I read the OpenCV tutorial. What worked for me was removing "opencv_haartraining_engined.lib" from the list of additional dependencies for the linker.

For this:

  • right click project
  • The properties
  • " "
  • " ", ""
  • 'opencv_haartraining_engined.lib'.

, .

+7

, .

,

#define _CRT_SECURE_NO_DEPRECATE

#define _CRT_SECURE_NO_WARNINGS
0

You can download "opencv_haartraining_engined.lib" from https://code.google.com/p/huro-sift/source/browse/trunk/Development/ObjectRecognition/resources/opencv242/lib/debug/opencv_haartraining_engined.lib?r=39

and copy / paste into "C: \ Open-CV-2.4.10 \ opencv \ build \ x64 \ vc11 \ lib"

0
source

Source: https://habr.com/ru/post/1537205/


All Articles