rust-ffmpeg icon indicating copy to clipboard operation
rust-ffmpeg copied to clipboard

Problem with libclang.dll on Windows 11

Open mcprotector opened this issue 1 year ago • 5 comments

Windows 11 Rust for Visual Studio

That message in build info: 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: [])

A lot of versions for clang downloaded, LIBCLANG_PATH set, but don't work.

mcprotector avatar Dec 22 '23 17:12 mcprotector

Hi there, I faced the same issue and did the following steps to fix it (not sure if this will work for you).

  1. Download a prebuilt version of clang.dll and libclang.dll: https://ziglang.org/deps/llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt.tar.xz
  2. Extract to a folder, then set the environment variable LIBCLANG_PATH to path\llvm+clang+lld-10.0.0-x86_64-windows-msvc-release-mt\bin
  3. The bin folder contains the required libraries and executables

After that, compiling and running my project worked out well. Please let me know if you run into any issues.

EpicCodeWizard avatar Dec 24 '23 20:12 EpicCodeWizard

@mcprotector

EpicCodeWizard avatar Dec 30 '23 20:12 EpicCodeWizard

Yes, I managed to solve this problem. It turned out that we needed to enter the path directly into the System.

Now I have another problem. Immediately after ffmpeg is initiated, system messages cannot be displayed on the console screen. And I basically don’t see what’s going on inside there.

mcprotector avatar Dec 31 '23 08:12 mcprotector

Not sure what you mean, can you provide some error logs?

EpicCodeWizard avatar Jan 02 '24 20:01 EpicCodeWizard

Not sure what you mean, can you provide some error logs?

There is no errors. Simply ffmpeg::init().unwrap(); block println output. Without I can echo messages to console. When ffmpeg is inited console have no messages.

println!("Hello World!"); output "Hello World!"

ffmpeg::init().unwrap();
println!("Hello World!");

empty output.

mcprotector avatar Jan 03 '24 11:01 mcprotector