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,4c019ad9cc913bbe X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-09-13 10:15:32 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!HSNX.atgi.net!cyclone-sf.pbi.net!151.164.30.35!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3D821D26.4B50F0A1@raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: The Dreaded "Missing Subunits" References: <1b585154.0209121449.ef12609@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 13 Sep 2002 12:15:18 -0500 NNTP-Posting-Host: 192.27.48.39 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1031937332 192.27.48.39 (Fri, 13 Sep 2002 12:15:32 CDT) NNTP-Posting-Date: Fri, 13 Sep 2002 12:15:32 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:28947 Date: 2002-09-13T12:15:18-05:00 List-Id: Peter Richtmyer wrote: > > I love the Gnat compiler but... > > I dread this error message: > > "No code generated for file xxxx.2.ada (missing subunits)" > > It means that I have a procedure or function declared "...is separate;" > in package xxxx, but there is no matching separate. Do you mean the separate doesn't exist or that it does not have the "right filename"? I will assume the latter. > A "legacy" package > has a gazillion separates. They need changes, and the calling > parameters get changed and don't match, or the routine name changes, > or the separate filename isn't right, or whatever happens to get this > message, and it is a real pain to figure out which "subunit" is missing. > I doubt these are causes of the error message. > Anybody have a solution? maybe a compile switch or ...? > What we use for code we ported from a rational system is... pragma Source_File_Name (Spec_File_Name => "*.1.ada"); pragma Source_File_Name (Body_File_Name => "*.2.ada"); These configuration pragmas should be in a file named gnat.adc (along with any other pragmas you may want to apply to every compilation). This is documented in both the GNAT User's Guide and Reference Manuals. In the User's Guide, look for sections titled "Configuration Pragmas", "Using Other File Names", and "Alternative File Naming Schemes". In the Reference Manual, look for the "Implementation Defined Pragmas" section and search for Source_File_Name. If you have an old version of GNAT that doesn't allow star names in this pragma - I suggest you get a newer version. If you have a large system with lots of directories, I can make some suggestions on organizing the build so it may work a little easier as well (and leverage data from the Apex configuration files that you may have). I suggest you take the time to read the user's guide and reference manual in their entirety. You will learn a lot about the GNAT product by doing so. --Mark