Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

opencv_world341d.dll was not found error

I am trying to run OpenCV on Visual Studios 2017. I built the libraries and bin with CMake, so far it is working good. However, when I try to run the code it says this:

This is the error code message that shows when I launch the "local windows debugger": This is the error code message that shows when I launch the "local windows debugger"

For some reason, it says that it can't find the DLL. I already assign the Aditional Dependencies in properties also I linked the "Included Directories" and "Included Libraries" to openCV in Visual Studios, the project is set to run in x64, and there are no errors on the programming it's just that error of DLL that shows.

The DLL can be found in a separate folder made by the compiler in a bin folder. However, it still says it can't be found.

This is the locations of the DLL files: This is the locations of the DLL files

Is there a solution for this?

I tried to add pictures I'm new in the forum it doesn't let me post them yet. I am not sure if the ones I upload will show.

This is the code I tried to run and bring the error message. The same happen with any other code.

I will add more images that may help to understand what I did so far and thanks in advance for the help.

This are the Visual Studios C/C++ Directories: This are the Visual Studios C/C++ Directories

This is the Linked section in Visual Studios properties: This is the Linked section in Visual Studios properties

This is the environment PATH from Environment Variables: This is the environment PATH from Environment Variables

This is all I did so far in the process to install OpenCV in Visual Studios.

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

int main() {
    cv::Mat image;
    std::cout << "This image is" << image.rows << "X" << image.cols << std::endl;

    image = cv::imread("puppy.bmp");

    if (image.empty()) {

    }

    cv::Mat result;
    cv::flip(image, result, 1);

    cv::waitKey(0);

    return 0;
}
like image 781
Ketechi Avatar asked Nov 30 '22 08:11

Ketechi


1 Answers

For me, restart to Visual Studio solved the problem, I guess that's because when I added the OpenCV to Environment Variable the Visual Studio was open

like image 73
Yinon_90 Avatar answered Dec 05 '22 18:12

Yinon_90