r/ada • u/DiligentBill2936 • 2d ago
Learning ada programming setup
i am planning to do setup for Ada. Bit confused on Alire/GNat/Gnat Studio.
Just downloaded GNat studio thinking its 'all in one' but its asking 'gpr build missing'
Can someone point to basic tutorial on how to setup the environment?
Thanks
8
Upvotes
5
u/jordansrowles 2d ago
I'd recommend installing Alire first, then running
alr toolchain --selectto install GNAT and GPRbuild.You can then create a project with
alr init --bin hello, enter the directory and runalr runto build and execute it.Once that's working, you can use
alr editto open the project in GNAT Studio, assuming you've installed Studio and it's available on your PATH.Edited for more info:
Most of this is different stuff:
4
u/Dmitry-Kazakov 2d ago
Under Linux gnat (the package name depends on the distribution), gprbuild, GNAT Studio are three to four) different packages:
Under Windows it is basically same. gnat and gprbuild are available as pacman packages under MSYS2. GNAT Studio can be installed from github.
Alire is a crate tool. It does not use the official policies and conventions of the platform. Nor does it use the platform's packaging system, e.g. Deb, RPM, pacman, MSI etc. Thus you should use it with care, keeping in mind possible integration and interoperability problems later.