From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3b29116893873fe2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!f16g2000cwb.googlegroups.com!not-for-mail From: "markww" Newsgroups: comp.lang.ada Subject: Re: Setting up an Ada hello world project Date: 31 Oct 2006 13:05:42 -0800 Organization: http://groups.google.com Message-ID: <1162328742.701001.142680@f16g2000cwb.googlegroups.com> References: <1162322045.860579.159590@i42g2000cwa.googlegroups.com> <4OO1h.21343$E02.8753@newsb.telia.net> NNTP-Posting-Host: 67.154.89.221 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1162328748 29353 127.0.0.1 (31 Oct 2006 21:05:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 31 Oct 2006 21:05:48 +0000 (UTC) In-Reply-To: <4OO1h.21343$E02.8753@newsb.telia.net> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: f16g2000cwb.googlegroups.com; posting-host=67.154.89.221; posting-account=cNKOMg0AAADT2ug8oGSYYXo8bsDvrHzw Xref: g2news2.google.com comp.lang.ada:7309 Date: 2006-10-31T13:05:42-08:00 List-Id: 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=F6rn Persson 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 pr= ogram. 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=F6rn Persson PGP key A88682FD > omb jor ers @sv ge. > r o.b n.p son eri nu