Problem with .dll when trying to run simple demo example

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:

  1. 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
  2. Add BUILD_DIR/bin to the Working Directory. e.g. Replace $(ProjectDir) in Properties->Debugging->Working Directory with BUILD_DIR/bin
  3. 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).