Opencv 4 at Visual Studio 2018

Asked

Viewed 214 times

0

I’m trying to use the Opencv library in Visual Studio, but I get the following error message:

LINK : fatal error LNK1104: cannot open file 'opencv_calib3d400.lib'

The lib is in place C: opencv4 build lib Release and I am not using it.

Follow the print:

Print

Follows the simple implementation without syntax error:

Opencv4.cpp

#include "pch.h"
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>


int main()
{
    cv::String path = "C:/opencv4/OpenCV4VS2018/OpenCV4VS2018/xicara.jpg";
    cv::Mat src = cv::imread(path);
    cv::imshow("test", src);
    cv::waitKey(10000);
    return 0;
    // std::cout << "De quem é esse Jegue?!\n"; 
}
  • 1

    See: https://stackoverflow.com/a/31906940/8353154

  • Remember to add the dependencies (Libraries and includes) of Debug and Release. If it is the one of debug, normally the file ends with the letter d.

  • When I entered the folder, I saw that there were no libs, so I pasted the files there. Now Visual Studio has changed the message stating that the files are for 32 bits and not for 64 bits.

  • Error LNK1112 type 'x86' machine module conflicts with target machine type 'x64' Opencv4vs2018 C: opencv4 Opencv4vs2018 Opencv4vs2018 opencv_highgui400.lib(opencv_highgui400.dll) 1

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.