comp.lang.ada
 help / color / mirror / Atom feed
From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: seperate compilation for protected objects
Date: Thu, 31 Mar 2005 15:44:37 +0200
Date: 2005-03-31T15:44:37+02:00	[thread overview]
Message-ID: <5sug2d.qmp.ln@hunter.axlog.fr> (raw)
In-Reply-To: <1112270905.678889.118410@f14g2000cwb.googlegroups.com>

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
>     <blah>
>     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



  parent reply	other threads:[~2005-03-31 13:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-31 12:08 seperate compilation for protected objects Andrew
2005-03-31 12:15 ` Peter Hermann
2005-03-31 12:20   ` Andrew
2005-03-31 12:22 ` Dr. Adrian Wrigley
2005-03-31 12:29   ` Andrew
2005-03-31 13:44 ` Jean-Pierre Rosen [this message]
2005-04-01  8:25   ` Andrew
replies disabled

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