Exit code: 0xc0000135, STATUS_DLL_NOT_FOUND

I'm at Win 10 Trying to work with PyO3 but got the mentioned error, by searching found something telling I've to:

Download vspkg and install vcpkg.exe install libusb:x64-windows-static . Set an environment variable LIBUSB_DIR that points to C:\vcpkg\installed\x64-windows-static and use the patched version of libusb-sys by putting this in your

So, i did so, but still getting the same error:

I tried testing the:

[dependencies]
libusb = "0.3"
libusb-sys = "0.2.3"

[patch.crates-io]
"libusb-sys" = { git = "https://github.com/cmsd2/libusb-sys" }

And got the below:

It looks like you're compiling for MSVC but we couldn't detect a libusb-1.0
installation.
', C:\Users\hasan.yousef\.cargo\git\checkouts\libusb-sys-5e09c578d58d3871\096f247\build.rs:89:5

Something to remember is that changing an environment variable using that window won't automagically propagate your new variables.

You need to start a new shell before you can use the LIBUSB_DIR, or you could set it for just the current shell using $env:LIBUSB_DIR = "path\to\libusb".

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.