comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Linking ADA files
Date: 1997/02/21
Date: 1997-02-21T00:00:00+00:00	[thread overview]
Message-ID: <dewar.856574266@merv> (raw)
In-Reply-To: 5elb2q$him@acmex.gatech.edu


Brian asks

<<  I want to write my packages in different files so I can debug each
separately then link them when I compile the "main" program.
How are the files set up for compiling? Typically I use a procedure
with the same name as the file and inside of which I declare a package.
Also what is the command to compile the main program and link these
files containing my packages?

 I've successfully compiled and ran programs in a single file with my
packages declared inside a procedure which acts as my main program.
But now my program is so large that I would like to break it up into
several files and work on each file separately.

 I didn't find a FAQ so forgive me if this question is too trival.>>

Brian, it sounds like you do not have the GNAT documentation. This seems
a common problem when GNAT gets installed (all versions of GNAT include
the documentation, but somehow it gets lost during the installation, so
actual users don't have it). Visit cs.nyu.edu, and you can find a copy
for yourself, which will answer this and many other questions.

In short, put specs in files called xxx.ads where xxx is the unit name.,
and put bodies in files called xxx.adb, where xxx is the unit name,
and compile and link the whole collection by gnatmake xxx, where xxx
is the name of the main program. That's all there is to it!





      reply	other threads:[~1997-02-21  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-21  0:00 Linking ADA files "none"
1997-02-21  0:00 ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox