Error running opencv

[dependencies]
opencv = "0.94.2"
tesseract = "0.15.1"
error: failed to run custom build command for `leptonica-sys v0.4.9`

Caused by:
  process didn't exit successfully: `C:\Users\trueb\OneDrive\Desktop\dope\dope-rs\target\debug\build\leptonica-sys-99610c5c6ca80ec9\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=LEPTONICA_INCLUDE_PATH
  cargo:rerun-if-env-changed=LEPTONICA_LINK_PATHS
  cargo:rerun-if-env-changed=LEPTONICA_LINK_LIBS
  cargo:rustc-link-search=native=C:\Users\trueb\Downloads\vcpkg\installed\x64-windows-static-md\lib
  cargo:rustc-link-lib=leptonica-1.84.1
  cargo:rustc-link-lib=zlib
  cargo:rustc-link-lib=tiff
  cargo:rustc-link-lib=lzma
  cargo:rustc-link-lib=jpeg
  cargo:rustc-link-lib=turbojpeg
  cargo:rustc-link-lib=openjp2
  cargo:rustc-link-lib=libwebpdecoder
  cargo:rustc-link-lib=libwebpdemux
  cargo:rustc-link-lib=libwebpmux
  cargo:rustc-link-lib=libwebp
  cargo:rustc-link-lib=libsharpyuv
  cargo:rustc-link-lib=libpng16
  cargo:rustc-link-lib=gif

  --- stderr
  thread 'main' panicked at C:\Users\trueb\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.64.0\./lib.rs:2393:31:

Do you have opencv installed? It has to be installed, and the OPENCV env vars have to be set, before the opencv crate will work.

installation for windows any method

The actual error is lower, after the "thread main panicked" line.

1 Like