nagisa / rust_libloading

Bindings around the platform's dynamic library loading primitives with greatly improved memory safety.

Home Page:https://docs.rs/libloading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add a dll search folder ?

makao007 opened this issue · comments

I want to put all the dll files into a folder called "mydll", and one of the dll dependence on other dll .
The below code go wrong because the a.dll depend on mydll/b.dll
Library::new("mydll/a.dll").unwrap();
how to fixed this ?

Consider one of the load path altering flags and passing them to libloading::os::windows::Library::load_with_flags. The flags are further documented here.

That said, this is a place for issues in libloading, rather than a support forum. A better place for questions like these would be stack overflow or https://users.rust-lang.org/. With that in mind I will close this issue for now. Thank you for considering this library :)