Clion配置OpenCV
系统环境变量的Path中添加..\opencv\mingw_build\install\x64\mingw\bin

然后配置好Cmakelist文件,变成如下所示:
```makefile cmake_minimum_required(VERSION 3.19) project(opencv_xin)//项目名字 set(CMAKE_CXX_STANDARD 11) set(OpenCV_DIR "E:\\opencv\\mingw_build") find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) (无影响) # ************ add_executable(main main.cpp) # ************ target_link_libraries(main ${OpenCV_LIBS}) ```
如果依然无法运行,可以尝试以下方法
进入CLion的Configuration,选择工作区目录,然后把bin目录放入

到此,windows下clion配置opencv完成