comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Maubach <ada_resources@gmx.de>
Subject: Re: Ada Packages
Date: 17 Sep 2011 07:18:20 GMT
Date: 2011-09-17T07:18:20+00:00	[thread overview]
Message-ID: <9divtrFlavU1@mid.individual.net> (raw)
In-Reply-To: 9diqfnFu6kU1@mid.individual.net

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




  parent reply	other threads:[~2011-09-17  7:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17  5:45 Ada Packages George
2011-09-17  6:15 ` Jeffrey Carter
2011-09-17  6:16 ` J-P. Rosen
2011-09-17  7:18 ` Georg Maubach [this message]
2011-09-17  7:42   ` Simon Wright
2011-09-17  7:46   ` Georg Maubach
  -- strict thread matches above, loose matches on Subject: below --
2004-02-17 10:20 ada packages Kuba Malczak
2004-02-17 11:10 ` Preben Randhol
2004-02-17 11:55   ` Kuba Malczak
1996-06-11  0:00 ADA PACKAGES Robert Adams
replies disabled

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