I’m building a new tool and I would like to compile on Windows as well.
I can’t find GNAT Community Edition anymore. I installed Alire toolchain with GNAT native and GPRBuild. When I build the project directly with gnatmake and gprbuild I get… an ELF binary. I guess some of my settings are wrong, but I’m lost.
Use a release from this GitHub repo. Download the GNAT one and the gprbuild one, unzip them to separate directories, and then put the bin directory from each one into PATH. Then you can just use gcc, gnatmake and gprbuild like normal from CMD
As a side note, the msys2 environment also provides gnat and gprbuild. It emulates a linux environment on windows (it build windows binaries though, not linux ones). Gives you access to tools like make, vim, etc.
It uses the pacman package manager. You would install things like gnat and gprbuild from there. Whenever I do a fresh install, I generally snag make, gcc, gprbuild, and git using the following commands: