comp.lang.ada
 help / color / mirror / Atom feed
From: "markww" <markww@gmail.com>
Subject: Re: Setting up an Ada hello world project
Date: 31 Oct 2006 13:05:42 -0800
Date: 2006-10-31T13:05:42-08:00	[thread overview]
Message-ID: <1162328742.701001.142680@f16g2000cwb.googlegroups.com> (raw)
In-Reply-To: <4OO1h.21343$E02.8753@newsb.telia.net>

Ah thanks guys some progress at last. I definitely agree about just
compiling via the command line, my apps will definitely be simple
enough for that. I gave it a shot and this was the output:

C:\Documents and Settings\Mark>gnatmake "C:\helloworld_ada.adb"
gcc -c -IC:\ -I- C:\helloworld_ada.adb
helloworld_ada.adb:4:11: warning: file name does not match unit name,
should be
"hello.adb"
gnatbind -x helloworld_ada.ali
gnatlink helloworld_ada.ali

No .exe is generated under C:\, is that because I received a warning?
Do warnings stop compilation, smae as errors?

Thanks so much,
Mark



On Oct 31, 3:58 pm, Björn Persson <spam-a...@nowhere.nil> wrote:
> markww wrote:
> > I finally got a working compiler for windows. However, I'm not quite
> > sure how to go about compiling a hello world application. The default
> > project created one source file with the text:
> [...]
> > but the compiler complains that there are no Ada sources in this
> > project. How do I go about adding an Ada source? I just want to run
> > something like:
>
> >     with Ada.Text_IO;
>
> >     procedure Hello is
> >     begin
> >        Ada.Text_IO.Put_Line("Hello, world!");
> >     end Hello;You don't need a project file to compile a hello world program. Since
> you have Gnat you should put that in a file named "hello.adb" and then
> run "gnatmake hello.adb". This should produce an executable file named
> "hello.exe".
>
> I think you should let the Gnat project files wait a bit. Right now you
> can think of them as something GPS uses to store the settings you make.
> Later, when you're more familiar with Ada, you can start learning what
> Gnat project files are useful for.
>
> --
> Björn Persson                              PGP key A88682FD
>                     omb jor ers @sv ge.
>                     r o.b n.p son eri nu




  reply	other threads:[~2006-10-31 21:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-31 19:14 Setting up an Ada hello world project markww
2006-10-31 19:43 ` Jeffrey R. Carter
2006-10-31 19:56   ` markww
2006-10-31 20:50     ` Michael Bode
2006-10-31 20:58 ` Björn Persson
2006-10-31 21:05   ` markww [this message]
2006-10-31 21:08     ` markww
2006-11-01  7:27 ` Martin Krischik
replies disabled

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