1

I built an OpenCV project in C++ visual studio 2019 using static library: I made path to the lib file and also set Runtime Library (in project properties--> C\C++--> code generation) as Multi-Threaded/MT. Project is in Release mode. Also I made similar to the following video: https://www.youtube.com/watch?v=or1dAmUO8k0

mike
  • 31
  • 2
  • The static library you linked to was probably an import library. These also have a .lib extension and are used alongside dlls – drescherjm Nov 25 '20 at 19:12
  • Does this answer your question? [Why does my program ask for OpencV's .dll even though I link statically against its .lib](https://stackoverflow.com/questions/38592708/why-does-my-program-ask-for-opencvs-dll-even-though-i-link-statically-against) – Константин Ван Dec 12 '22 at 23:17

1 Answers1

0

Yes, you also need to set these dlls into system environment variables. The dlls are from [OpenCVInstallation]\build\x64\vc15\bin and OpenCVInstallation\build\bin, which is like: the image

Dylan
  • 504
  • 2
  • 5
  • 9