cpp opencv static library

OpenCV 5 + Visual Studio 2022 win 64 static library
How to use Opencv as static library (without DLL)in VC++projects

download

download OpencV 5 from https://github.com/opencv/opencv/tree/5.x

build

extract the files
use Cmake

  • BUILD SHARED LIBS OFF
  • BUILD OPENCV_WORLD ON

visual studio

  • ALL_BUILD DEBUG RELEASE
  • INSTALL DEBUG RELEASE

use static library

in VC++project you can link to static library (without DLL requirement)

  • C/C++->Code generation -> runtime library -> Multi-threaded (/MT)
  • add path header files
  • add path lib files

ref

(12335) How to setup static library opencv 5 in Visual Studio 2022 (it doesn't require DLL) - YouTube: https://www.youtube.com/watch?v=XggcLC0xmyw

posted on 2024-12-27 22:17  yusisc  阅读(3)  评论(0编辑  收藏  举报

导航