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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d516a6b61d50c7ae X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!208.49.83.146.MISMATCH!atl-c08.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!KNOLOGY.NET-a2kHrUvQQWlmc!not-for-mail Date: Wed, 01 Mar 2006 08:19:43 -0600 From: "Marc A. Criley" User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Compiling separates with GPS GPL version (Ada 2005 i think) References: <1141216674.749938.132650@j33g2000cwa.googlegroups.com> In-Reply-To: <1141216674.749938.132650@j33g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <3f682$4405ad47$45491254$21922@KNOLOGY.NET> X-Complaints-To: abuse@usenetserver.com Organization: UseNetServer.com X-Trace: 3f6824405ad47e0ecb7f121922 Xref: g2news1.google.com comp.lang.ada:3222 Date: 2006-03-01T08:19:43-06:00 List-Id: 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 > > 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