My Environment:
Windows 10 1809
Visual studio 2022
vcpkg commit 6a29f32
libvpx & opus installed with vcpkg:
libvpx:x64-windows 1.11.0#1
opus:x64-windows 1.3.1#6
I have tried some ffmpeg binding crates with vcpkg and succeed, so the vcpkg settings would be correct.
when I run "cargo build", it shows
...
Compiling opus-sys v0.1.0 (https://github.com/rust-av/opus-rs#a59e7a10)
Compiling vpx-sys v0.1.1 (https://github.com/rust-av/vpx-rs#84694096)
error: failed to run custom build command for opus-sys v0.1.0 (https://github.com/rust-av/opus-rs#a59e7a10)
Caused by:
process didn't exit successfully: D:\Code\rust\rust-av\examples\target\debug\build\opus-sys-c6e88b1fe60364f8\build-script-build
(exit code: 101)
--- stdout
cargo:rerun-if-env-changed=OPUS_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=OPUS_STATIC
cargo:rerun-if-env-changed=OPUS_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: Error(PkgConfig(Could not run "pkg-config" "--libs" "--cflags" "opus" "opus >= 1.3"
The pkg-config command could not be found.
Most likely, you need to install a pkg-config package for your OS.
If you've already installed it, ensure the pkg-config command is one of the
directories in the PATH environment variable.
If you did not expect this build to link to a pre-installed system library,
then check documentation of the opus-sys crate for an option to
build the library from source, or disable features or dependencies
that require pkg-config.), State { next_error: None })', C:\Users\Administrator.cargo\git\checkouts\opus-rs-377ca7da91dbf68d\a59e7a1\opus-sys\build.rs:19:34
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for vpx-sys v0.1.1 (https://github.com/rust-av/vpx-rs#84694096)
Caused by:
process didn't exit successfully: D:\Code\rust\rust-av\examples\target\debug\build\vpx-sys-603f0f9baa1bcc53\build-script-build
(exit code: 101)
--- stdout
cargo:rerun-if-env-changed=VPX_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-pc-windows-msvc
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_pc_windows_msvc
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: PkgConfig(Could not run "pkg-config" "--libs" "--cflags" "vpx" "vpx >= 1.5.0"
The pkg-config command could not be found.
Most likely, you need to install a pkg-config package for your OS.
If you've already installed it, ensure the pkg-config command is one of the
directories in the PATH environment variable.
If you did not expect this build to link to a pre-installed system library,
then check documentation of the vpx-sys crate for an option to
build the library from source, or disable features or dependencies
that require pkg-config.)', C:\Users\Administrator.cargo\git\checkouts\vpx-rs-ab48b307657c386f\8469409\vpx-sys\build.rs:19:51
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace