Visual Studio's libclang.dll inaccessible to Rust

Trying to get bindings to work on Windows with Rust is like pulling teeth. I've installed Clang via Virtual Studio and the program seems to fine it, but it inexplicably cannot open it. I have verified the lib does exist in that locaiton.

thread 'main' panicked at 'Unable to find libclang: "the libclang shared library at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin\libclang.dll could not be opened: LoadLibraryExW failed"', C:\Users\user.cargo\registry\src\\bindgen-0.64.0./

There's a thread with a similar issue, but it's on Linux. I am building natively on Windows.

I have no idea why this is happening.

Edit 1: I believe the issue may be that Visual Studio's version of libclang.dll is x86 but the environment I'm in is x64. I'm not sure. I guess I'll have to try and install Clang some other way.

I've been wrestling with this for hours vaguely knowing what I'm doing, but for anyone else with this issue, just use choco.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.