comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Drummond <brian@shapes.demon.co.uk>
Subject: Re: How to compile Barnes' examples from his book using GNAT
Date: Sun, 6 Dec 2015 11:24:21 -0000 (UTC)
Date: 2015-12-06T11:24:21+00:00	[thread overview]
Message-ID: <n415t5$uko$2@dont-email.me> (raw)
In-Reply-To: 2c68ffdd-f55e-4c68-84f1-fbe0f83a0b57@googlegroups.com

On Sun, 06 Dec 2015 02:49:23 -0800, Jerry wrote:

> How does one compile Barnes' examples from his book, Programming in Ada
> 2012, with GNAT? The programs are available here: cambridge.org/barnes
> -> Resources -> Programs.

It should be as simple as "gnatmake main_program.adb".

In fact it isn't ... quite. Taking the first on that list, XPROG6.txt for 
example, I see that it has to be split into .ads files for each package, 
and matching .adb files for each package body and the main program.

Tedious ... except there's a tool called "gnatchop" to do that.

So, 
gnatchop XPROG6.txt
gnatmake tower_of_hanoi.adb

Job done.

-- Brian

  reply	other threads:[~2015-12-06 11:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 10:49 How to compile Barnes' examples from his book using GNAT Jerry
2015-12-06 11:24 ` Brian Drummond [this message]
2015-12-06 18:17   ` Jeffrey R. Carter
2015-12-06 21:21     ` Pascal Obry
2015-12-06 22:33       ` Jeffrey R. Carter
2015-12-08  2:01         ` Randy Brukardt
2015-12-07  9:01   ` Jerry
2015-12-07  9:36     ` Jacob Sparre Andersen
2015-12-10  3:26       ` Jerry
2015-12-10  8:55         ` J-P. Rosen
2015-12-10 12:34           ` G.B.
2015-12-07 14:21     ` Simon Wright
replies disabled

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