Bindgen cargo:rustc-link-search does not search correctly

    let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
    //println!("{}", dir);

Running cargo test
I get: process didn't exit successfully: `Z:\fmod-sys\target\debug\deps\fmod_sys-da70d1db139b5151.exe` (exit code: 0xc0000135, STATUS_DLL_NOT_FOUND)

The paths are correct, the linker path is being ran, I have no idea why this doesn't work: despite telling it to look in the lib folder. When I drag all the dlls in the debug\deps\fmod-sys folder it works though.

It linked sucessfully, but to actually run it, windows needs to find the dll at runtime. Windows doesn't have support for rpaths, so you will either need to place the dll in the same dirbas the executable or install it into C:\Windows\System32.

1 Like