Open djeedai opened 11 months ago
This is due to library search paths and affects all OS. I get around with via LD_LIBRARY_PATH on Linux. related https://github.com/rust-lang/cargo/issues/4895
https://github.com/bevyengine/bevy/issues/6723 same root issue.
The std
DLL is part of your Rust toolchain installation. If you are using Rustup, you can find it under the path where rustup installs your toolchain.
Something interesting I found out - using a path dependency makes bevy_dylib
get linked as bevy_dylib.dll
(no hash!). The std still has the hash but that should certainly be stable unless you switch Rust versions.
Edit: using a git or crates.io dependency still results in the hashed dll.
Bevy version
0.12.1
[Optional] Relevant system information
Win11
What you did
Try to run
program.exe
from either thetarget/debug
or thetarget/debug/deps
folder.What went wrong
Program fails to start:
bevy_dylib-34dfd29b56be4d40.dll
if not indeps/
.std-5a4aac4b2cd4ff41.dll
in both cases, and I have no idea where it is (nowhere under my project hierarchy, I assume somewhere in some Cargo cache?).Additional information
It's all too complicated and requires too much tribal knowledge to run a simple application outside of
cargo run
. One example is hooking RenderDoc, but otherwise just simply to run it without having to open a terminal.assets/
folder.Trying to match all requirements at once is extremely difficult, because you're limited to a single working directory (which is the simplest way to fix most of those issues). I probably managed to do it in the past, but I already forgot how, if it didn't change in the meantime.
Additionally it looks like some
bevy_dylib.dll
was copied intarget/debug
, possibly as an attempt to fix that (?), however the executable produced depends on the version with the hash, not the stripped one, asobjdump
confirmed:I couldn't find any relevant (enough) information in documentations. On docs.rs, there's no mention of
dynamic_linking
anywhere. On the Bevy website, there's the following note:But it falls short of giving enough information for the user to actually fix the issue as 1) the location of the DLL is not explained, and 2) as shown above this is not enough, you also need
std-xxx.dll
.