This repository contains everything necessary to build a Vagrant box based on Debian buster with a preinstalled MinGW Cross Environment (MXE) cross-building environment.
Instead of building a base box from scratch an existing box is modified and repackaged as described by Nicholas Cerminara.
- Modify
share/mxe/settings.mk
. - Install vagrant-vbguest. (type
vagrant plugin install vagrant-vbguest
.) - Run
vagrant up --provision
. - Put project directory onto
share
. - Enter virtual machine with
vagrant ssh
. - Execute the build command in the project directory in the
share
directory.
This error occurs when the host vbguest and client vbguest versions do not match. Type and update the following commands.
vagrant vbguest
Reload when you're done.
Put this file in the project directory where you want to build and execute it with ssh.
#!/bin/sh
MINGW_ROOT=/home/$USER/mxe
MINGW_PREFIX=$MINGW_ROOT/usr
MINGW_TARGET=x86_64-w64-mingw32.static
MINGW_PATH="$MINGW_PREFIX/$MINGW_TARGET/bin:$MINGW_PREFIX/bin"
STD_PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11/bin"
PATH="$MINGW_PATH:$STD_PATH" \
ACLOCAL_FLAGS="-I$MINGW_PREFIX/$MINGW_TARGET/share/aclocal" \
LDFLAGS=-Wl,-S LIBS="-lstdc++ -lws2_32 -liphlpapi" \
./autogen.sh \
--prefix=$MINGW_PREFIX --target=$MINGW_TARGET --host=$MINGW_TARGET \
PATH="$MINGW_PATH:$STD_PATH" make -j`nproc`