Open triplewz opened 3 years ago
It can be compiled on Windows, but you need to install openssl library first.
The easiest way is to install Strawberry Perl, which will include all the requried openssl dependences.
It can be compiled on Windows, but you need to install openssl library first.
The easiest way is to install Strawberry Perl, which will include all the requried openssl dependences.
Some of features need openssl source code for cross compilation targeting other instruction set.
But for x86/x64, there is actually an easier way to install precompiled openssl from https://slproweb.com/products/Win32OpenSSL.html
Then cargo build
should work.
I have installed OPENSSL, and set system environment variable. But it did't work.
error: failed to run custom build command for `openssl-sys v0.9.60`
Caused by:
process didn't exit successfully: `C:\Users\rust\WeDPR-Lab-Core\target\debug\build\openssl-sys-9907d4d9e796620a\build-script-main` (exit code: 101)
--- stdout
cargo:rustc-cfg=const_fn
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
running "perl" "./Configure" "--prefix=C:\\Users\\rust\\WeDPR-Lab-Core\\target\\debug\\build\\openssl-sys-d00d5dea42c1c716\\out\\openssl-build\\install" "no-dso" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-engine" "no-asm" "VC-WIN64A"
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "系统找不到指定的文件。" }', C:\Users\.cargo\registry\src\mirrors.sjtug.sjtu.edu.cn-7a04d2510079875b\openssl-src-111.13.0+1.1.1i\src\lib.rs:413:39
Strange. Use openssl on Windows is complex :-)
Could you try to remove OPENSSL_INCLUDE_DIR and OPENSSL_LIB_DIR?
I only set OPENSSL_DIR=C:\Program Files\OpenSSL-Win64 on my computer.
If it is still not working , just try installing the Strawberry Perl.
I reinstalled OPENSSL, and built it successfully. Thanks!
Cool. Good to know this :-)
你好,请问这个能在windows下编译吗,我编译的时候出现这个问题是怎么回事呢?