comp.lang.ada
 help / color / mirror / Atom feed
* how do you compile and run ... (hello world)
@ 2014-08-23 13:54 gdotone
  2014-08-23 14:19 ` Dmitry A. Kazakov
  2014-08-23 17:56 ` Jeffrey Carter
  0 siblings, 2 replies; 5+ messages in thread
From: gdotone @ 2014-08-23 13:54 UTC (permalink / raw)


i have downloaded gnat gpl edition from libre.adacore.com

i have installed gnat. it is located /usr/local/gnat/

i have created a file called hello.adb, found in ADA95 textbook,

with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
   Put_Line ("Hello World");
end Hello;

i have cd into /usr/local/gnat/bin
typed:     gnat

and got this 

GNAT GPL 2014 (20140331)
Copyright 1996-2014, Free Software Foundation, Inc.

List of available commands

gnat bind               gnatbind
gnat chop               gnatchop
gnat clean              gnatclean
gnat compile            gnatmake -f -u -c
gnat check              gnatcheck
gnat elim               gnatelim
gnat find               gnatfind
gnat krunch             gnatkr
gnat link               gnatlink
gnat list               gnatls
gnat make               gnatmake
gnat metric             gnatmetric
gnat name               gnatname
gnat preprocess         gnatprep
gnat pretty             gnatpp
gnat stack              gnatstack
gnat stub               gnatstub
gnat test               gnattest
gnat xref               gnatxref

All commands except chop, krunch and preprocess accept project file switches -vPx, -Pprj and -Xnam=val

i then cd back into my home dir :   cd ~ 
where the hello.adb file is located

i entered: gnat compile hello.adb 

i got back:

       gcc -c hello.adb

in the directory i see:

   hello.adb
   hello.ali
   hello.c.save
   hello.o

what do i need to do to run the program ... and compile if i have done something wrong?

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

end of thread, other threads:[~2014-08-23 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-23 13:54 how do you compile and run ... (hello world) gdotone
2014-08-23 14:19 ` Dmitry A. Kazakov
2014-08-23 17:57   ` gdotone
2014-08-23 17:56 ` Jeffrey Carter
2014-08-23 18:14   ` gdotone

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