How do you install GNAT (GNU Ada) on a Windows computer?

Ok, I'm learning a multilingual project. I am considering part of this creature in Hell. I already know AdaCore packages, but I will need to link each file separately, which means that the easiest way is to go through GCC.

The only problem is that GNAT seems to be mostly written in Ada, and I can't find a guide to install it anywhere.

MinGW took care of some of the other languages ​​for me, but apparently GNAT was not included in this.

Thanks in advance!

+4
source share
4 answers

If you later decide to install MinGW Ada, you can upgrade your existing installation using the mingw-get command shown below, for example mingw-get install ada . More information can be found here .

An alternative compiler uses it, as suggested in this related one.

  $ mingw-get --help
 Manage MinGW and MSYS installations (command line user interface).

 Usage:
   mingw-get [OPTIONS] ACTION [package-spec ...]

   mingw-get update
   mingw-get [OPTIONS] {install |  upgrade |  remove} package-spec ...
   mingw-get [OPTIONS] {show |  list} [package-spec ...]

 Options:
   --help, -h Show this help text
   --version, -V Show version and license information

 Actions:
   update Update local copy of repository catalogs
   list, show List and show details of available packages
   install Install new packages
   upgrade Upgrade previously installed packages
   remove remove previously installed packages

 Package Specifications:
   [subsystem-] name [-component]:
   msys-bash-doc The 'doc' component of the bash package for MSYS
   mingw32-gdb All components of the gdb package for MinGW

 Use 'mingw-get list' to identify possible package names
 and the components associated with each.

Appendix: In Windows XP, I sent mingw-get list via grep to send a list .

  $ mingw-get list |  grep -i ada
 ...
 Package: mingw32-gcc-v3-ada Subsystem: mingw32
 The GNU Ada Compiler
 This package provides the MinGW implementation of the GNU Ada language
 written in the Ada language.
 ...
 $ gnatmake --version
 GNATMAKE 4.5.2
 Copyright (C) 1995-2010, Free Software Foundation, Inc.
 ...
+3
source

I uploaded 64bit GNU ada to SF.NET in a Mingw-w64 project.

+3
source

Go to the AdaCores Libre website , download the installer and run it!

However, I think that you will have a problem with your scheme of compiling the source files separately; Ada code must support development, which is not something you want to manage manually. I have not tested it myself (I am not programming Windows if I can help), but here is some information about using GNAT with Windows ; worth a look.

+2
source

Things like Ada Web Server require the Ada developer to have a unix-like environment even on Windows, so I always install MSYS along with the GNAT GPL. There are several guides to using MSYS with MinGW. The only problem is that the recent automatic MSYS installer is configured by default to use non-AdaCore MinGW, which we don’t want.

The latest normal (non-automated) MSYS installer is here:

http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe/download

After installation, you will be asked to indicate the location of MinGW. Write c: / GNAT / 2012 or whatever you use for GNAT (without bin).

On Windows Seven, this script came out for an unknown reason, but connecting MSYS and MinGW is as easy as writing

 c:/GNAT/2012 /mingw 

in C: \ msys \ 1.0 \ etc \ fstab

+1
source

Source: https://habr.com/ru/post/1383468/


All Articles