From: "Marc A. Criley" <mcNOSPAM@mckae.com>
Subject: Re: Compiling separates with GPS GPL version (Ada 2005 i think)
Date: Wed, 01 Mar 2006 08:19:43 -0600
Date: 2006-03-01T08:19:43-06:00 [thread overview]
Message-ID: <3f682$4405ad47$45491254$21922@KNOLOGY.NET> (raw)
In-Reply-To: <1141216674.749938.132650@j33g2000cwa.googlegroups.com>
stuart clark wrote:
> i have package spec which declares two visible task. Thye package body
> then declares these tasks as separates. i then have the task in
> individual files named
>
<snips>
> Questions
> 1) What am i doing wrong???
As best I recollect (and I stopped using "separates" a _long_ time ago),
when you compile a package body designating units as separate with the
_GNAT_ compiler, it brings in and compiles those units as part of the
body compilation. (This is specific to the GNAT compiler, others may
differ.)
What this means is that attempting to compile the "separate" unit files
alone *has no effect*. This is why you get the error message:
> cannot generate code for file common_to_both_1553-io_1553.adb (subunit)
> to check subunit for errors, use -gnatc
To reiterate, the GNAT compiler compiles separate units when it compiles
the body of the unit from which they're separate. The most you can do
with the separate unit itself is simply have GNAT scan it for errors.
So, you ask, why even bother having subunits? Precisely! :-) If you're
using a GNAT compiler, there isn't much point, which is one of the
reasons why I stopped using them a long time ago.
-- Marc A. Criley
-- McKae Technologies
-- www.mckae.com
-- DTraq - XPath In Ada - XML EZ Out
next prev parent reply other threads:[~2006-03-01 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-01 12:37 Compiling separates with GPS GPL version (Ada 2005 i think) stuart clark
2006-03-01 14:19 ` Marc A. Criley [this message]
2006-03-01 22:22 ` stuart clark
2006-03-01 22:22 ` stuart clark
2006-03-03 6:20 ` Simon Wright
2006-03-03 22:24 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox