I want to compile an opencv Console C++ program in Visual Studio 2013. This is my code:
#include \"stdafx.h\"
#include \"opencv2/highgui/highgui.hpp\"
#inclu
Best and simple solution is
Add path_variable of OpenCV/build/x64/bin in environment system variables.
And then restart the visual studio.
this definitely will solve the problem.
the problem might be you've updated the path variable after opening the visual studio so it can't update the *.dll files.
After installing OpenCV version 3.4.1 for use with VS 2017 following these instructions, Visual Studio complained about missing opencv_world341d.dll
. Even though I had added C:\opencv\build\x64\vc15\bin
to the windows PATH, Visual Studio still couldn't find it as VS was already open when I modified the PATH. Restarting Visual Studio fixed the problem.
You can check your system variable to confirm the directory in which opencv_world300.dll
is located (maybe C:\opencv\build\x64\vc12\bin
) is present.
If it exists but the problem still is not solved, try to put all .dll
files in the directory to C:\WINDOWS\system32
I just had the exact same problem using version 320. In my case my "Comodo Internet Security" was blocking a few things of the application itself and of OpenCV. Make sure to put them all on the "trusted" list by right clicking on them in your firewall.