-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile on Windows (again) #326
Comments
Did you check https://github.com/twistedfall/opencv-rust#troubleshooting, item 4? |
@twistedfall Thanks for the reply! question edited. Now I have a P.S. That folder does contain dll files, e.g.
|
Even tried this command: where path is specified in unix style, which is mentioned in README like:
|
I'd still need the debug dump of the build as produced by |
I found the solution: Directly download from https://github.com/opencv/opencv/releases/tag/4.5.5 Wait a minute, I will write down |
Then it's probably related to inability to load clang dll |
After more experiments I see the problem:
suffices to compile happily without errors. Thanks for your suggestions! (one comment above is deleted since later I found it wrong) |
For people in the future facing similar problems, here are my setup that works:
opencv_base_dir = vision_utils_dir / \
'vision_utils_flutter_wrapper/windows/opencv-4.5.5-openvino-dldt-2021.4.2-vc16-avx2'
opencv_link_paths = opencv_base_dir / 'build/lib'
opencv_include_paths = opencv_base_dir / 'build/include'
assert opencv_link_paths.exists() and opencv_include_paths.exists(), \
f'Please manually download and put opencv for windows files into {opencv_base_dir}'
opencv_envs = {
'OPENCV_LINK_PATHS': str(opencv_link_paths),
'OPENCV_LINK_LIBS': 'opencv_imgcodecs455,opencv_imgproc455,opencv_core455',
'OPENCV_INCLUDE_PATHS': str(opencv_include_paths),
}
logger_main.message(f'opencv_envs={" ".join(f"{k}={v}" for k, v in opencv_envs.items())}')
for k, v in opencv_envs.items():
os.environ[k] = v
run_command([
'cargo', 'build',
*profile.cargo_extra_flags,
'--lib',
'-vv'
], cwd=rust_base_dir) |
For anyone still getting the error |
Thank you so much! I've got this setup working once before and was trying to get it set up on another machine and was absolutely falling apart unsure of why the DDLs were not getting found since I had not run into this issue previously. You saved me from so much trouble! You have no idea the sheer number of places I attempted to put the necessary env variables only for it to turn out LLVM was missing from path. |
Hi thanks for the lib! I have checked the README and links in it but still fail.
Before reporting an issue please first check the
troubleshooting guide. If
the issue you're encountering is not solved thereby please state the following in your bugreport:
choco install opencv
rustc --version
): rustc 1.55.0 (c8dfcfe04 2021-09-06)Reproduction:
More info I can think of:
Some folder looks like:
For more logs: Run in a
powershell
, I get:The text was updated successfully, but these errors were encountered: