Building headless Gapcoin and Gapcoin-qt for Windows

HOW-TO cross-compile Windows binaries using a “depends” build

Apr 9, 2021 • Graham Higgins < 1 min to read •

Soup-to-nuts cross-compilation on Ubuntu 18/20 host, contributed by Wizz

git clone
cd gapcoin-core/
git submodule init
git submodule update
sudo apt update
sudo apt upgrade
sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git
sudo apt install g++-mingw-w64-x86-64
sudo update-alternatives --config x86_64-w64-mingw32-g++  #Set manually the default mingw32 g++ compiler option to posix.
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status"
cd depends
make HOST=x86_64-w64-mingw32
cd ..
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/ ./configure --prefix=/