EZ2LOAD.DOC
We have done some testing using the DOS mode of Windows 95,
and using a Windows 95 DOS window; everything seems to
operate successfully in those modes. If you have problems,
try booting DOS by pressing F4 at system startup, before
Windows 95 has a chance to start.
If you are a
started with
a "pure" DOS
know what to
adacaps
and the IDE will start. We give no further details here on
AdaCAPS; refer to the online help or ADACAPS.DOC.
GNAT/DOS File Names
------------------To use GNAT without difficulty, you must make sure that your
Ada unit (program or package) name agrees with its file name
(except that the file name should be in lower case). Further,
a package specification should have an .ads (Ada Specification)
file extension and any other unit should have an .adb (Ada Body)
extension.
A main program My_Prog should be in a file called my_prog.adb.
A package My_Pack should be divided into my_pack.ads and
my_pack.adb. When you are first getting started, keep your
program and package names at 8 or fewer characters, so that
the DOS file names will match exactly. When you gain experience,
you can learn GNAT's rules for converting longer unit names
into 8+3 file names. These rules appear in GNATINFO.TXT.
The GW-GNAT Suite of Programs: GCOMPILE, GLINK, GEXECUTE
-------------------------------------------------------AdaCAPS handles compilation, linking, and execution by invoking
the appropriate GW-GNAT program. These programs encapsulate the
most common options, and provide automatically for listing files
and debugging support.
These programs can also be executed from the DOS command line,
so we describe them here. Used consistently, these programs make
it easy for new users to get started with GNAT. To use these,
you must first have executed the batch file described above.
Compiling
--------To compile a program, say My_Prog, in a file my_prog.adb, type
gcompile my_prog.adb
Whether or not there are any compilation errors, gcompile
always produces a listing file for your program unit.
(In a class environment, this ensures that your listing is
always consistent with your compiled code.) An .ads source
files produces a .lss listing file; an .adb file produces
an .lsb listing file.
GNAT produces, as part of its compilation output, a .o (object
code) and an .ali file. The .ali files are used by the binder
to check package dependencies.
Binding and Linking
------------------In Ada, binding is the process of checking the consistency of
the set of program units making up an executable. Linking is
the process of actually producing the executable from its
component object modules (including those from the Ada
run time libraries).