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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,51e16ccc6a07b0c7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 11:25:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: circular unit dependency Date: 23 May 2003 14:08:42 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <3ECDE7D1.9010507@alcatel.de> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1053714269 11074 128.183.235.92 (23 May 2003 18:24:29 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 23 May 2003 18:24:29 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:37708 Date: 2003-05-23T18:24:29+00:00 List-Id: Mirko Aigner writes: > Hi Again !! > > Any way to prevent this compiler error (circular unit dependency) > without deleting one of the "with" statements ?! You will have to change something. You'll have to post the code, so we can help you figure out what to change. Try to simplify it first. If you have something like: with A; package B is type B_Type is record A_Obj : A.A_Type; end record; end B; with B; package A is type A_Type is record B_Obj : B.B_Type; end record; end A; then the only way to "fix" this is to put both types in one package. They belong together, since they are dependent on each other. Other types of circular with can be cured by introducing a "parent" type. > Is there any way to make sure that on spec is only once "included" > ?! "with" in Ada is really, really _not_ the same as "include" in C. By definition, each package is in the library only once. -- -- Stephe