emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
22.23k stars 1.6k forks source link

example doesn't link in Windows (11): "cannot find -lshlwapi" #2856

Open fr-an-k opened 1 year ago

fr-an-k commented 1 year ago

Describe the bug As directed by the readme (after cloning egui and entering the directory), I run:

cargo run --release -p egui_demo_app

According to the readme it should work out-of-the-box on Windows, however it cannot find the shlwapi library:

   Compiling egui_demo_app v0.21.0 (C:\Users\frank\repos\egui\crates\egui_demo_app)
error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-Wl,C:\\Users\\frank\\AppData\\Local\\Temp\\rustcTHMga8\\list.def" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained\\dllcrt2.o" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "C:\\Users\\frank\\AppData\\Local\\Temp\\rustcTHMga8\\symbols.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.0.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.1.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.10.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.11.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.12.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.13.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.14.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.15.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.2.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.3.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.4.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.5.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.6.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.7.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.8.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.egui_demo_app.6692ed00-cgu.9.rcgu.o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.2a7tq0lk1nd9aadl.rcgu.o" "-L" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps" "-L" "C:\\Users\\frank\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\winapi-x86_64-pc-windows-gnu-0.4.0\\lib" "-L" "C:\\Users\\frank\\.cargo\\registry\\src\\github.com-1ecc6299db9ec823\\windows_x86_64_gnu-0.42.1\\lib" "-L" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui_demo_lib-f2fa9f36ac8615a8.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libunicode_names2-665b15b82d955f7a.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libenum_map-ef4f3a02cafa584b.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui_extras-ea8804caa6f626c4.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libchrono-cc24da761089f866.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libnum_integer-45a031b14b7b6779.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libnum_traits-0a1f07aee3d719bc.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libtime-d2e619cbf149e0d8.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libeframe-cf2372693a6af555.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libdirectories_next-bd6c30aeb79fcdc9.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libdirs_sys_next-4aadb0de72fd065a.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libglutin_winit-0d18957431e0646e.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libglutin-d61af45ca3b6918d.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libglutin_wgl_sys-4a7054750aebc2dd.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liblibloading-30ac1615d0e8082b.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libglutin_egl_sys-552847bcb1f06681.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui_winit-2e11938f71167a8b.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libwebbrowser-50d828052537663a.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liburl-e6c143d8afee16b4.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libidna-7f804b280cd8ab8e.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libunicode_normalization-010e5bee440d3178.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libtinyvec-e9e327c80ff0734f.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libtinyvec_macros-6c5370b2b307d8ae.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libunicode_bidi-1784d961beb0b6c7.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libform_urlencoded-386e8c3267c4e3a5.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libpercent_encoding-e46675f994681242.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libarboard-6962620103966358.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libclipboard_win-497ecb7726e1440f.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liberror_code-7089bf28ccca8103.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liblibc-49c3355935eab2cf.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libstr_buf-4d7095deaba3fc2b.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libwinapi-4cd6f257053981da.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libthiserror-090283ef86637d03.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libwinit-11814a1445a7b615.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libraw_window_handle-08bcb72108cbb7fa.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libcty-c4955ff0fee0afe8.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libinstant-d5e3c68cbf06cced.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liblog-5dfba02aa77ed920.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui_glow-ee7c2c7c25c7a6db.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libmemoffset-fa9200355fa82d4e.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libglow-419bda9617dbe034.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui-8917f96948d20a05.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libron-f4b36d22415be328.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libbase64-bbc0c41760168ffb.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libbitflags-e3e9b32a70e0019e.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libtracing-77ade26e0a528461.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libpin_project_lite-2d54438324ea06fb.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libtracing_core-313d2173c1e7c45a.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libepaint-6af12d19deb60bb8.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libnohash_hasher-7201463007d07628.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libecolor-78f7c655fb8145f4.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libahash-996a6fa297a648b6.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libonce_cell-7ccfc295fffb20de.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libab_glyph-e3aa5a8f7fea46fc.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libowned_ttf_parser-a92b6ee87ead3841.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libttf_parser-6d4c76dbc4ef1b40.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libab_glyph_rasterizer-d4d698a9e75f6644.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libparking_lot-50ffe61f2ec5eeec.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libparking_lot_core-c6bdb9d9213a0746.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libwindows_sys-0e54445fdbcfcc4f.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libcfg_if-0d6f9e92cbe234c8.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libsmallvec-3aaa653790f7ab52.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\liblock_api-532655889c8d4a93.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libscopeguard-9713dd8fd004d2f1.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libemath-4626d272410a7ceb.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libbytemuck-5367cb207cd14176.rlib" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libserde-8c47970fc3be5e5d.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-e363be82127e72d4.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-271c0a4c2400bd0e.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libobject-3b3a88ddf57ad9b8.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libmemchr-c38acbaaa0512e61.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libaddr2line-a777dde688506f47.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libgimli-00e812c5215e2bb4.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_demangle-9824443ffde90bb7.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_detect-c9cae9f57d72c5d8.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libhashbrown-80b5e088fad27661.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libminiz_oxide-25b744457ec6a6b9.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libadler-b662208514509737.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_alloc-70e1db2cbff7c5e3.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-bc622eac43f92150.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcfg_if-da38528f9991ea5d.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-0217604e5fc185ea.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-094368c19a10127d.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librustc_std_workspace_core-9310325d5d5607bd.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-5c3fe6fc6388f93c.rlib" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-d765c9bc514400ee.rlib" "-Wl,-Bdynamic" "-lopengl32" "-lshlwapi" "-lwinapi_advapi32" "-lwinapi_cfgmgr32" "-lwinapi_gdi32" "-lwinapi_kernel32" "-lwinapi_msimg32" "-lwinapi_ole32" "-lwinapi_opengl32" "-lwinapi_runtimeobject" "-lwinapi_shell32" "-lwinapi_shlwapi" "-lwinapi_synchronization" "-lwinapi_user32" "-lwinapi_winspool" "-lwindows" "-lkernel32" "-ladvapi32" "-luserenv" "-lkernel32" "-lws2_32" "-lbcrypt" "-lgcc_eh" "-l:libpthread.a" "-lmsvcrt" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "-Wl,--nxcompat" "-nostartfiles" "-L" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-L" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\self-contained" "-o" "C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\egui_demo_app.dll" "-Wl,--gc-sections" "-shared" "-Wl,--out-implib=C:\\Users\\frank\\repos\\egui\\target\\release\\deps\\libegui_demo_app.dll.a" "-Wl,-O1" "-nodefaultlibs" "C:\\Users\\frank\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
  = note: ld: cannot find -lshlwapi

Expected behavior Work as documented

Desktop (please complete the following information):

Additional context toolchain appears fine; I tried reinstalling stable-x86_64-pc-windows-gnu and removing ./rust-toolchain but that didn't make a difference.

YgorSouza commented 1 year ago

For what it's worth, it works fine with msvc. MinGW is kind of finicky in my experience, maybe you're just missing some package or path configuration?

fr-an-k commented 1 year ago

I'm using rustup so it's supposed to just work without any configuration. I'm guessing it's an issue in another crate, but shwapi is from the legacy windows API and the winapi crate doesn't seem to have been touched in years. It does seem that this issues wasn't there a few days earlier, but I have no idea why it would fail now since I'm not doing anything with C++/mingw/msvc.

wareya commented 1 year ago

I started experiencing this (on windows 10) after updating my terminal emulation environment from an old mingw-w64 distribution with git bash to a modern clean git bash distribution with no C/C++ toolchain stuff lying around. Just did a clean rustup and everything just to be sure that everything rust thinks should be there is there. It's only happening with egui/eframe projects, not rust projects in general. The error happens when using the stable-x86_64-pc-windows-gnu toolchain, but not when using the stable-x86_64-pc-windows-msvc toolchain.

Unactived commented 1 year ago

On a toolchain stable-x86_64-pc-windows-gnu installed with rustup on Windows 10, with everything including the OS somewhat fresh, I encounter the same issue.

However, the demo appears to compile and work fine when compiled inside MinGW. Having an installation of MSYS2, MSYS2 MINGW64 opens up the MinGW shell inside which Rust and may be installed with pacman -S mingw-w64-x86_64-rust. Then cargo and related tools are available. As in the description of the issue, cloning and running cargo run --release -p egui_demo_app provides a .exe which appears functional, and may then e.g. be copied to the Desktop and ran from there.

I already had the MSYS2 installation when trying the command in Windows CMD and failing. I assume performing things from MinGW takes care of the DLL issues, which maybe can otherwise be addressed by only using files provided by MinGW as suggested in https://users.rust-lang.org/t/rust-not-compiling-project-exit-code-1/95821 ; without working explicitly in this environment and relying on its package management to provide Rust.

Indeed when writing the Rust version I obtained through pacman in MSYS2 is one version behind the current stable released 2.5 weeks ago.

Totoro83 commented 1 year ago

I already had the MSYS2 installation when trying the command in Windows CMD and failing. I assume performing things from MinGW takes care of the DLL issues, which maybe can otherwise be addressed by only using files provided by MinGW as suggested in https://users.rust-lang.org/t/rust-not-compiling-project-exit-code-1/95821 ; without working explicitly in this environment and relying on its package management to provide Rust.

I temporarily solved with the solution suggested here. In particular, I added this to config.toml:

[target.x86_64-pc-windows-gnu]
rustflags = [
    "-LC:\\Program Files (x86)\\Windows Kits\\10\\Lib\\10.0.22621.0\\um\\x64"
]

(of course the windows kit need to be installed. I installed mine with Visual Studio Installer.)

Unactived commented 1 year ago

(of course the windows kit need to be installed. I installed mine with Visual Studio Installer.)

While this is great if it works for you, I feel like it does not address some underlying issues. At least in my case, the interest in the GNU toolchain stems from the apparent impossibility to compile company code (with some minor exceptions) to MSVC without Microsoft Build Tools or equivalent, requiring a paid Visual Studio license. AFAIK, same goes for the Windows Kit, and not for MinGW.

Though I get that for some, working with the GNU ABI may be required for basic interoperability needs with other software compiled as such.

I mimicked the solution for MinGW by doing

[target.x86_64-pc-windows-gnu]
# linker = "x86_64-w64-mingw32-gcc"
# ar = "x86_64-w64-mingw32-gcc-ar"
rustflags = [
    "-LC:\\msys64\\mingw64\\lib"
]

and it seems to work. Thanks for the input on the use of rustflags for this.

I assume this in itself does not address the issue that things should compile "out-of-the-box" or be documented.

keriefie commented 6 months ago

I've just started getting this error when returning to my egui project, where both RustRover and egui/eframe had updated. The solution above did not seem to work. The problem persists both with stable-x86_64-pc-windows-gnu and stable-x86_64-pc-windows-msvc.

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-va" ...
  = note: ld: cannot find -lshlwapi: No such file or directory
xairaven commented 2 months ago

I can offer a solution that is a "dirty workaround". But it is basically universal for all linking problems. Maybe it will help someone like me who is looking for a simple solution.

The point: add .dll to the directory with toolchain libraries.

First of all, you need to download the file itself, for us it is shlwapi.dll. The link I used (I am not responsible for the source, download at your own risk)

Next, you need to find out your toolchain. Enter the command rustup show into your command line:

active toolchain
----------------

1.76.0-x86_64-pc-windows-gnu (overridden by 'D:\Programming\egui\rust-toolchain')
rustc 1.76.0 (07dca489a 2024-02-04)

After that, find the directory with your toolchains. For me it is C:\Users\Alex\.rustup\toolchains.

Next, you need to go to the root directory of libraries of specific toolchain, and just add the downloaded file there! The final path in my case: C:\Users\Alex\.rustup\toolchains\1.76.0-x86_64-pc-windows-gnu\lib\rustlib\x86_64-pc-windows-gnu\lib

I saw that the IDE also pulled in the wasm-unknown-unknown target. So, I copied the dll there too (just in case): C:\Users\Alex\.rustup\toolchains\1.76.0-x86_64-pc-windows-gnu\lib\rustlib\wasm32-unknown-unknown\lib

After these steps, the project compilation was successful😎