The project is build successfully but when I hit the run button in both Debug and Release configurations I get this message “A dependent dll was not found” and the screen
says that the .dll in question is OpenCV_core470d.dll (or …core470.dll for release configuration correspondently). I guess this will happen for no matter which dll.
So many options. Given that opencv_core470d.dll etc. are contained in BUILD_DIR/bin and lets say your running opencv_example.exe you could:
Change the Debugging command to point to the version in the bin directory. e.g. Replace $(TargetPath) in Properties->Debugging->Command with BUILD_DIR/bin/opencv_example.exe
Add BUILD_DIR/bin to the Working Directory. e.g. Replace $(ProjectDir) in Properties->Debugging->Working Directory with BUILD_DIR/bin
Add BUILD_DIR/bin to your user (need to restart Visual Studio) or system (need to restart windows) path variable either in the command line (set) or GUI (search Edit the System Environment Variables).