Rust使用OpenCV

cargo new imageutil
cd imageutil

[dependencies]
opencv = "0.53"

use opencv::prelude::*;

https://github.com/llvm/llvm-project/releases/tag/llvmorg-12.0.1
LLVM-12.0.1-win64.exe
Install

Releases
opencv-4.5.3-vc14_vc15.exe Install set environment variables: OPENCV_INCLUDE_PATHS=E:\opencv\build\include OPENCV_LINK_PATHS=E:\opencv\build\x64\vc15\lib 注意不要带.lib OPENCV_LINK_LIBS=opencv_world453 Add E:\opencv\build\x64\vc15\bin to Path Error: cargo build Compiling opencv v0.53.2 error: failed to run custom build command for `opencv v0.53.2` Caused by: process didn't exit successfully: `D:\RustOpenCV\target\debug\build\opencv-6e32b3c429f12c06\build-script-build` (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND) Run:D:\RustOpenCV\target\debug\build\opencv-6e32b3c429f12c06\build-script-build.exe error while loading shared libraries: libclang.dll Add C:\Program Files\LLVM\bin to Path Add: LIBCLANG_PATH=D:\Program Files\LLVM\bin