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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Can .ads be compiled alone? Date: Mon, 17 Nov 2014 06:50:24 +0000 Organization: A noiseless patient Spider Message-ID: References: <520f8f3d-b345-4ef8-ac41-ead78edde92a@googlegroups.com> <558e3ad3-8d64-46f4-a0ca-6df137b256ec@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="a84de0bef967d8cbddafca7d81f7b456"; logging-data="726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z/jZXMM1ODflFF7v5dXVSPUeoR3pDlg8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:iHLofeLN6ZPTl85LJnb94t2kz5o= sha1:+nVRZxdQR14wmGWdbJIDsgNDsU4= Xref: number.nntp.giganews.com comp.lang.ada:190752 Date: 2014-11-17T06:50:24+00:00 List-Id: 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.