-
-
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
Tutorial for static builds on windows? #581
Comments
Possible found the answer here: https://github.com/spoorn/media-to-ascii/blob/a01017fbb3dc883a89b0a1aff237c69b072542b2/.github/workflows/build.yml Will reopen it if it does not work. |
I've moved the installation guide into a separate file, so this is now the correct link: https://github.com/twistedfall/opencv-rust/blob/master/INSTALL.md#static-build I haven't really tried building and linking statically on Windows myself, so if you have success please share and I'll link to your comment in the readme, thanks! |
@twistedfall ended up getting it to work, using a mix of vcpkg and choco. I used I used https://github.com/mcgoo/cargo-vcpkg Added the following to my
Then create a cargo config file in
Then run Once that completes you'll be able to use cargo as normal. Eg |
Hello, [dependencies]
opencv="*" show below error === OpenCV library configuration: Library {
include_paths: [
"D:\\projects\\rust\\opencv4\\target\\vcpkg\\installed\\x64-windows-static-release\\include",
],
version: Version {
major: 0,
minor: 0,
patch: 0,
},
cargo_metadata: [
"cargo:rustc-link-search=D:\\projects\\rust\\opencv4\\target\\vcpkg\\installed\\x64-windows-static-release\\lib",
"cargo:rustc-link-lib=opencv_core4",
"cargo:rustc-link-lib=opencv_imgproc4",
"cargo:rustc-link-lib=zlib",
],
}
thread 'main' panicked at D:\software\cargo\registry\src\rsproxy.cn-8f6827c7555bfaf8\opencv-0.89.0\build.rs:346:9:
Unsupported OpenCV version: 0.0.0, must be from 3.2, 3.4 or 4.x branch |
@adminSxs your version of opencv is outdated. Use Here is my opencv entry in opencv = { version = "0.92.0", default-features = false,features = ["rgb", "imgproc"] } |
Can't seem to find any guide for building staticically on windows.
#104 (comment)
@twistedfall left a message in that comment with a link to https://github.com/twistedfall/opencv-rust#static-build but it does not exist anymore unfortunately.
My current attempt uses the following env vars
but it still looks for a dll on startup
The text was updated successfully, but these errors were encountered: