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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b86e978488429db7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-28 21:57:58 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.stueberl.de!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Per Sandberg Newsgroups: comp.lang.ada Subject: Re: Compilation error with GNAT Date: Thu, 29 Jan 2004 06:56:25 +0100 Organization: Cuivre, Argent, Or Message-ID: References: <6c8918f3.0401281100.2a000840@posting.google.com> Reply-To: per.sandberg@bredband.net NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1075355799 1761 80.67.180.195 (29 Jan 2004 05:56:39 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Thu, 29 Jan 2004 05:56:39 +0000 (UTC) Cc: comp.lang.ada@ada-france.org To: Ben Horowitz Return-Path: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208 X-Accept-Language: en-us, en, sv In-Reply-To: <6c8918f3.0401281100.2a000840@posting.google.com> X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:5026 Date: 2004-01-29T06:56:25+01:00 Start with the basic GNAT complilation model. GNAT is treating spec/body alternativly spec if the spec does'nt requrie a body as a unit for compilation. Asume the folowing: package no_body is end no_body; package with_body is procudere dummy; end with_body; package with_body is procudere dummy is begin null;end; end with_body; Then you will be able to generate code for no_body'spec and with_body'spec/with_body'body. The compiler will compilain when you are trying to generate code from with_body'spec since that file wont generate any code. You will get code from no_body'spec when compiling the source file no_body.1.ada and from the pair with_body'spec/with_body'body when compiling with_body.2.ada. It is all explaind in detail in the GNAT documentation /Per Sandberg Ben Horowitz wrote: > Hi, > > I'm trying to sort through a compilation problem that I'm having with > Gnat. I have a large set of source files, some of which are spec > only, and some of which have both spec and body. The file that is > giving me a problem has only a spec. I am using the XXX.1.ada and > XXX.2.ada naming convention. > > I first try to compile this file using gnatmake and the project file > below. Gnat complains that the file has only a spec, so it can't > generate code. Later, it reports a compilation error. The output of > gnatmake and the project file I used are given below. > > I thought at first that the problem might be that I needed to use the > -gnatc option to gnat/gcc for the troublesome file. I tried this (see > the second compilation run below). Gnatmake now warns that an ALI or > object file is missing after compile. Gnatmake nonethess goes on, > ending up by reporting a compilation error that seems quite similar to > the first. > > What might be causing this problem? What are the possible fixes? > > Of course, one solution would be to give the troublesome file a (more > or less) empty body. However, I wish to avoid this, as it requires a > large amount of manual labor. > > Thanks, > Ben