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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e5cc1b2c83f144e8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.13.102 with SMTP id g6mr239787pbc.1.1316243901685; Sat, 17 Sep 2011 00:18:21 -0700 (PDT) Path: m9ni8059pbd.0!nntp.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Georg Maubach Newsgroups: comp.lang.ada Subject: Re: Ada Packages Date: 17 Sep 2011 07:18:20 GMT Message-ID: <9divtrFlavU1@mid.individual.net> References: <9diqfnFu6kU1@mid.individual.net> Mime-Version: 1.0 X-Trace: individual.net KT2ToFvSrUfR8q9NksvZ4Qwr6d0HdEeICljUZ+eqgebxyKzvsR Cancel-Lock: sha1:ZC+rCBpeC9JSjTf8JGR1rrFNUlw= User-Agent: Pan/0.132 (Waxed in Black) Xref: news1.google.com comp.lang.ada:17999 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2011-09-17T07:18:20+00:00 List-Id: Hi Jeffrey, Hi Jean-Pierre, you're right: I left my comments out. I started all over, deleted both files and build a new file with just the three lines in it: package Basic_Num_IO is procedure Num_IO; end Basic_Num_IO; The compiler error is now gcc-4.3 -c basic_num_io.ads cannot generate code for file basic_num_io.ads (package spec) to check package spec for errors, use -gnatc gnatmake: "basic_num_io.ads" compilation error I tried gcc-4.3 -c -gnatc basic_num_io.ads. No error occured. How can I fix that? Kind regards George Am Sat, 17 Sep 2011 05:45:27 +0000 schrieb George: > Hi All, > > I tried to build a basic package. My two files look like this: > > File 1: basic_num_io.ads > > package Basic_Num_IO is > procedure Num_IO; > end Basic_Num_IO; > > File 2: basic_num_io.adb > > with text_io; use text_io; > > package body Basic_Num_IO is > procedure Num_IO is > package Integer_InOut is new Integer_IO(integer); package > Float_InOut is new Integer_IO(float); begin > null; > end Num_IO; > end Basic_Num_IO; > > If I call gnat compile basic_num_io.ads I get the error message: > > basic_num_io.ads:8:01: end of file expected, file can have only one > compilation unit > > What am I doing wrong? Where can I find it in the documentation? > > Kind regards > > George