一、安装 llvm opencv

参考:​​https://github.com/twistedfall/opencv-rust/issues/118​

  1. 安装​​Chocolatey​​ 以管理员身份启动powerShell执行:
    ​Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))​​ – 安装 Chocolatey 截图:
  2. Rust-opencv 安装_下载地址

  3. 将OpenCV和LLVM安装为​​choco install llvm opencv​​ –安装截图:(确保网络通畅)
  4. Rust-opencv 安装_github_02

  5. 添加以下环境变量:
    ​OPENCV_LINK_LIBS​​ , ​​OPENCV_LINK_PATHS​​,​​OPENCV_INCLUDE_PATHS​
  6. Rust-opencv 安装_github_03

二、llvm-config 安装

windows10下编译llvm-config 【参考】

  1. cmake​​下载​​,安装,并配置到PATH中。
  2. 下载llvm源码。​​–【10.0.0下载地址】​
  3. Rust-opencv 安装_opencv_04


报错:​​cargo:warning=could not execute 'llvm-config' one or more times, if the LLVM_CONFIG_PATH environme​

linux-CentOS 安装:

安装依赖:

sudo yum -y install curl git zip unzip
sudo yum -y install gcc gcc-c++
sudo yum -y install

安装shell文件:https://github.com/twistedfall/opencv-rust/tree/master/ci
待续。

解决参考:https://github.com/KyleMayes/clang-rs