comp.lang.ada
 help / color / mirror / Atom feed
* Linking ADA files
@ 1997-02-21  0:00 "none"
  1997-02-21  0:00 ` Robert Dewar
  0 siblings, 1 reply; 2+ messages in thread
From: "none" @ 1997-02-21  0:00 UTC (permalink / raw)



   I'm new to ADA so this should be relatively simple. 
 I'm using GNAT307 for DOS.  (GNAT 95)

  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 Franklin
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!bf14
Internet: bf14@prism.gatech.edu




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linking ADA files
  1997-02-21  0:00 Linking ADA files "none"
@ 1997-02-21  0:00 ` Robert Dewar
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Dewar @ 1997-02-21  0:00 UTC (permalink / raw)



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!





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-02-21  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-21  0:00 Linking ADA files "none"
1997-02-21  0:00 ` Robert Dewar

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