Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1.09 KB

File metadata and controls

18 lines (14 loc) · 1.09 KB

egui-sdl2-event-example

Bare-bones example for using egui in SDL2 window with egui-wgpu as the backend renderer and egui-sdl2-event as the event handler.

cargo run

Cross-compile from Linux to Windows with static linking

  1. Download SDL2-devel-2.XX.X-mingw.zip from here and extract to your specified location. Best to use the same version that rust-sdl2 uses.
  2. Install Windows toolchain target with rustup target add x86_64-pc-windows-gnu
  3. Install mingw cross-compiler to your system, for Arch systems the package to install should be mingw-w64-gcc
  4. Edit the cross_compile_windows.sh script to match your system's paths and run it.
  5. You should now have windows executable in your target/x86_64-pc-windows-gnu/release/ which you can run with wine. I don't have a Windows machine at the moment, so I cannot verify that it works on real Windows machine, yet.