1. About This Guide#
This guide describes the use of GNAT, a compiler and software development toolset for the full Ada programming language. It documents the features of the compiler and tools, and explains how to use them to build Ada applications.
GNAT implements Ada 95, Ada 2005, Ada 2012, and Ada 202x, and it may also be invoked in Ada 83 compatibility mode. By default, GNAT assumes Ada 2012, but you can override with a compiler switch (Compiling Different Versions of Ada) to explicitly specify the language version. Throughout this manual, references to ‘Ada’ without a year suffix apply to all Ada versions of the language, starting with Ada 95.
1.1. What This Guide Contains#
This guide contains the following chapters:
Getting Started with GNAT describes how to get started compiling and running Ada programs with the GNAT Ada programming environment.
The GNAT Compilation Model describes the compilation model used by GNAT.
Building Executable Programs with GNAT describes how to use the main GNAT tools to build executable programs, and it also gives examples of using the GNU make utility with GNAT.
GNAT Utility Programs explains the various utility programs that are included in the GNAT environment
GNAT and Program Execution covers a number of topics related to running, debugging, and tuning the performace of programs developed with GNAT
Appendices cover several additional topics:
Platform-Specific Information describes the different run-time library implementations and also presents information on how to use GNAT on several specific platforms
Example of Binder Output File shows the source code for the binder output file for a sample program.
Elaboration Order Handling in GNAT describes how GNAT helps you deal with elaboration order issues.
Inline Assembler shows how to use the inline assembly facility in an Ada program.
1.2. What You Should Know before Reading This Guide#
This guide assumes a basic familiarity with the Ada 95 language, as described in the International Standard ANSI/ISO/IEC-8652:1995, January 1995. Reference manuals for Ada 95, Ada 2005, and Ada 2012 are included in the GNAT documentation package.
1.4. Conventions#
Following are examples of the typographical and graphic conventions used in this guide:
Functions
,utility program names
,standard names
, andclasses
.Option flags
File names
Variables
Emphasis
[optional information or parameters]
Examples are described by text
and then shown this way.
Commands that are entered by the user are shown as preceded by a prompt string comprising the
$
character followed by a space.Full file names are shown with the ‘/’ character as the directory separator; e.g.,
parent-dir/subdir/myfile.adb
. If you are using GNAT on a Windows platform, please note that the ‘\’ character should be used instead.