Here are some instructions to build the full version on windows, for the non-gui version you would need to change the configure command I think:
1. Install MSYS2: Go to
https://www.msys2.org/ and download and install the latest version of MSYS2, e.g. msys2-x86_64-20210725.exe.
2. Start a MSYS2 terminal with mingw 32-bit (not 64bit!) and type the commands below that are marked with a $:
3.Update the core packages:
$ pacman -Syu
If anything is installed, close the terminal and redo this step until everything is up to date (might be 3 or 4 times).
4.Get the build chain tools:
$ pacman -S automake autoconf libtool pkg-config flex bison make cvs
5.Check out the latest code:
$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/gnubg co gnubg
6.Get the required packages:
$ pacman -S mingw-w64-i686-toolchain mingw-w64-i686-gtk2 mingw-w64-i686-gtkglext
I installed all of them. (Maybe this can be automated using makepkg or similar?)
7.Configure the make files:
$ cd gnubg
$ ./autogen.sh
$ sh non-src/cglm.shar
$ ./configure
$ notepad config.h
Add this line to the end of the "config.h" file
#define USABLE_UNDER_MSYS 1
8. Build gnubg
$ make
$ make install
9. Run gnubg
$ gnubg