comp.lang.ada
 help / color / mirror / Atom feed
* seperate compilation for protected objects
@ 2005-03-31 12:08 Andrew
  2005-03-31 12:15 ` Peter Hermann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew @ 2005-03-31 12:08 UTC (permalink / raw)


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

If I put the declaration for the protected body in tasks.ads and remove
it from the package body then I get:
tasks.ads:<#>:<#>: proper body not allowed in package spec
tasks.ads:<#>:<#>: all components must be declared in spec
...

If I put the "is seperate" statement in both files I get:
tasks.adb:<#>:<#>: all components must be declared in spec


I don't get it.

Andrew




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-04-01  8:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2005-04-01  8:25   ` Andrew

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