Environment
- Operating system: Windows 11 Pro
25H2 (Build 26200.7840)
- OpenCV Version:
4.13.0 (Official binary distribution)
- Rust version: rustc
1.93.1 (01f6ddf75 2026-02-11)
- LLVM/Clang version:
22.1.0
Description of the issue
I am encountering a build failure with the opencv crate (v0.92.3). Despite manually configuring all necessary environment variables, the build script fails with:
Could not detect OpenCV version from include_paths.
I have confirmed that:
opencv_version command works in PowerShell (returns 4.13.0).
- The path
C:\opencv\build\include\opencv2\core\version.hpp is present and accessible.
- Environment variables are set in both System Env and
.cargo/config.toml.
Current Configuration (.cargo/config.toml)
[env]
OPENCV_VERSION = "4.13.0"
OPENCV_INCLUDE_PATHS = "C:\\opencv\\build\\include"
OPENCV_LINK_PATHS = "C:\\opencv\\build\\x64\\vc16\\lib"
OPENCV_LINK_LIBS = "opencv_world4130"
LIBCLANG_PATH = "C:\\APP\\LLVM\\bin"
build_log.txt
Additional Context
It seems the build script's regex/probing logic might be incompatible with the header format in OpenCV 4.13.0 on Windows, or it's failing to prioritize the manually provided OPENCV_VERSION variable.
Environment
25H2 (Build 26200.7840)4.13.0(Official binary distribution)1.93.1 (01f6ddf75 2026-02-11)22.1.0Description of the issue
I am encountering a build failure with the
opencvcrate (v0.92.3). Despite manually configuring all necessary environment variables, the build script fails with:Could not detect OpenCV version from include_paths.I have confirmed that:
opencv_versioncommand works in PowerShell (returns 4.13.0).C:\opencv\build\include\opencv2\core\version.hppis present and accessible..cargo/config.toml.Current Configuration (.cargo/config.toml)
build_log.txt
Additional Context
It seems the build script's regex/probing logic might be incompatible with the header format in OpenCV 4.13.0 on Windows, or it's failing to prioritize the manually provided OPENCV_VERSION variable.