#!/bin/bash
### This follows instructions in
### "Let's cross-compile examples from rust-sdl2 project from Ubuntu to
### Windows x86_64 [source].
|
if [
then
fi
#sudo apt install gcc-mingw-w64-x86-64 -y
# use rustup to add target https://github.com/rust-lang/rustup.rs#cross-compilation
# Based on instructions from https://github.com/AngryLawyer/rust-sdl2/
# First we need sdl2 libs
# links to packages https://www.libsdl.org/download-2.0.php
#sudo apt-get install libsdl2-dev -y
|
# Prepare files for building
## Prevent [compiler error] `undefined reference to__onexitend`
### [source]: https://stackoverflow.com/questions/31492799/cross-compile-a-rust-application-from-linux-to-windows
### [compiler error]: https://stackoverflow.com/questions/56602101/i-cant-get-cross-compiling-from-ubuntu-to-windows-working