Open zoeesilcock opened 4 months ago
I had this issue for a while, and in my case the solution was using "cdylib" instead of "dylib" in the dynamically reloaded library cargo.toml:
[lib]
crate-type = ["rlib", "cdylib"]
thread 'tokio-runtime-worker' panicked at crates\frontend\src\logics\theme.rs:11:1:
failed to create hot reload loader: LibraryLoadError(LoadLibraryExW { source: Os { code: 126, kind: Uncategorized, message: "The specified module could not be found." } })
Same error as you, it doesn't work under Windows, it works under Linux.
I was trying to integrate hot-lib-reloader into my bevy project and got to the point where everything compiled and ran, but the hot reloading wasn't working. After trying to fix it in various ways I decided to try the example from the repo to sanity check my system setup. I ran the cargo watch line and it compiled successfully. Next I ran the cargo run line which compiled successfully but then panicked just after it launched. The panic is on line 9 which is the
hot_lib_reloader::hot_module
line and running the exact same command without the--features reload
part worked and gave a working game.I also tested on MacOS and that gave me a fully functioning example with working hot reloading, so it appears to be a Windows specific issue.
On Windows I used Powershell, but I also tried cmd.exe and got the same result. I am using rustc version 1.80.0-nightly in both cases.
Full output from from cargo run on Windows:
Let me know if I can test anything to help resolve this.