comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Can .ads be compiled alone?
Date: Mon, 17 Nov 2014 06:50:24 +0000
Date: 2014-11-17T06:50:24+00:00	[thread overview]
Message-ID: <lybno69v7z.fsf@pushface.org> (raw)
In-Reply-To: 558e3ad3-8d64-46f4-a0ca-6df137b256ec@googlegroups.com

rriehle@itu.edu writes:

> The code, in the example, which I originally published in my book, Ada
> Distilled, was compiled with GNAT.  I first compiled the
> specification, and then the body.

The trouble is that if you use GNAT to compile a spec that needs a body
you get

   $ gnatmake -c -u -f driver.ads
   gcc -c driver.ads
   cannot generate code for file driver.ads (package spec)
   gnatmake: "driver.ads" compilation error

and this confuses a *lot* of new users.

The latest Emacs ada-mode doesn't offer a 'compile current file'
option. Instead, -gnatc (Check syntax and semantics only (no code
generation)) is used (bound to C-c C-v), and is extremely effective.


  reply	other threads:[~2014-11-17  6:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07  5:21 Can .ads be compiled alone? moixa
2014-11-07  6:09 ` Jeffrey Carter
2014-11-07 17:26   ` Robert A Duff
2014-11-07 17:41     ` Jeffrey Carter
2014-11-07  6:20 ` J-P. Rosen
2014-11-07  7:48 ` Chris Moore
2014-11-07 14:54   ` Tero Koskinen
2014-11-07 15:49     ` Björn Lundin
2014-11-07 16:29       ` G.B.
2014-11-08 13:01         ` moixa
2014-11-08 14:55           ` G.B.
2014-11-07 16:29       ` G.B.
2014-11-07 16:44     ` Adam Beneschan
2014-11-07 17:14   ` Shark8
2014-11-08 21:31     ` Chris Moore
2014-11-07 16:50 ` Adam Beneschan
2014-11-07 17:14   ` Robert A Duff
2014-11-08  2:01     ` Randy Brukardt
2014-11-15 12:54 ` rriehle
2014-11-15 19:17   ` Robert A Duff
2014-11-15 19:19     ` Robert A Duff
2014-11-17 15:52       ` Adam Beneschan
2014-11-17  0:07     ` rriehle
2014-11-17  6:50       ` Simon Wright [this message]
2014-11-24  3:16     ` rriehle
2014-11-24  6:34       ` Jeffrey Carter
replies disabled

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