-1

I've just installed Visual Studio (2017 Community) and OpenCV (3.4.1 win pack) , and I'm working with C++. So I just attempted to copy one of the sample codes of OpenCV from its source folder, but I faced this error:

enter image description here

Then I tried reinstalling the same version of OpenCV, but nothing changed. So I just decided to download another version of OpenCV, I downloaded OpenCV 2.4.13.5 , and there's another error now:

enter image description here

Any ideas/suggestions?

Edit:

So I made these changes

enter image description here

and got this error:

enter image description here

which is right, it really doesn't exist:

enter image description here

So..was such file supposed to exist in that folder? (and btw I can't even find it in any other folder)

mitrafrz
  • 51
  • 6
  • put the linked dlls in your build dir – Joseph D. Apr 10 '18 at 12:47
  • @codekaizer could you explain a bit more detailed? Like where exactly and what exactly should I add to the project properties (If I'm right?) ? I'm just so beginner in this. Thank you. – mitrafrz Apr 10 '18 at 12:52

1 Answers1

0

Here is a guide for configuring a visual studio project to be able to run opencv.

First after installing opencv go to the folder where you installed it, for me it's C:\opencv34 denote this by <your path>.

There navigate to <your path>\build\x64\vc15\bin and copy both opencv_world340.dll and opencv_world340d.dll into the directory where your project is saved.

Then in your project go to Project->Properties->C\C++->General. In Additional Include Directories add <your path>\include

Finally go to Project->Properties->Linker. Under General->Additional Library Directories add <your path>\x64\vc15\lib and under Input\Additional dependencies add opencv_world340.lib for release configuration and opencv_world340d.lib for debug configuration.

Hope this helps.

Barel Levy
  • 111
  • 2
  • 9
  • Thanks for your help, I did just as you said, and made changes in the description of my post. It now says the .exe file doesn't exist in the /x64/debug folder and that system can't find it. What do I do now? – mitrafrz Apr 11 '18 at 10:57