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,86f72a7c465f6eb3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!freenix!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: seperate compilation for protected objects Date: Thu, 31 Mar 2005 15:44:37 +0200 Organization: Adalog Message-ID: <5sug2d.qmp.ln@hunter.axlog.fr> References: <1112270905.678889.118410@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1112277788 18418 195.25.228.57 (31 Mar 2005 14:03:08 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 31 Mar 2005 14:03:08 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: fr, en In-Reply-To: <1112270905.678889.118410@f14g2000cwb.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:10189 Date: 2005-03-31T15:44:37+02:00 List-Id: Andrew a �crit : > Hello, > > I am trying to do seperate compilation with a protected object. > > I have something similar to the following: > > === file tasks.ads === > package Tasks is > > protected type Boob is > . . . > end Boob; > end Tasks; > > === file tasks.adb === > package body Tasks is > > protected body Boob is seperate; > end Tasks; > > I am using Gnat3.15p on FreeBSD Unix. > I get similar compilation messages to the below: > tasks.adb:<#>:<#>: all components must be declared in spec > ... > A wild guess, since you didn't show the body: Didn't you declare components in the body? i.e. protected body Boob is X : integer; -- Not allowed .... end Boob; Remember that a protected object is actually more like a record than a package; it has no variables, only components (like record components), and they are not allowed in the body. Presumably, this has nothing to do with separate compilation... -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr