fitzgen / bindgen-tutorial-bzip2-sys

A tutorial/example crate for generating C/C++ bindings on-the-fly with libbindgen
The Unlicense
76 stars 10 forks source link

cargo build error #7

Open kouzhudong opened 1 year ago

kouzhudong commented 1 year ago
PS E:\code\rust\code\bindgen-tutorial-bzip2-sys> cargo build
   Compiling bindgen-tutorial-bzip2-sys v0.1.0 (E:\code\rust\code\bindgen-tutorial-bzip2-sys)
error: failed to run custom build command for `bindgen-tutorial-bzip2-sys v0.1.0 (E:\code\rust\code\bindgen-tutorial-bzip2-sys)`

Caused by:
  process didn't exit successfully: `E:\code\rust\code\bindgen-tutorial-bzip2-sys\target\debug\build\bindgen-tutorial-bzip2-sys-f0e339024d515ed8\build-script-build` (exit code: 101)
  --- stdout
  cargo:rustc-link-lib=bz2

  --- stderr
  thread 'main' panicked at 'Unable to find libclang: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [(C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\Llvm\\bin\\libclang.dll: invalid DLL (32-bit))])"', C:\Users\Administrator\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bindgen-0.66.0\lib.rs:604:31
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
PS E:\code\rust\code\bindgen-tutorial-bzip2-sys>
kouzhudong commented 1 year ago

in windows, no linux.