* GNAT Error - Subunit not found
@ 2006-01-20 0:08 deepblue2
2006-01-20 0:24 ` John
2006-01-20 3:56 ` Gautier Write-only
0 siblings, 2 replies; 6+ messages in thread
From: deepblue2 @ 2006-01-20 0:08 UTC (permalink / raw)
Hello, I am getting this compiler error for the Ada code. I am trying
to do this:
package body temp is
procedure temp1 is separate;
than in a file called temp2.adb
separate(temp)
procedure temp1 is
begin
end temp
I am getting compiler error..does any know how would I compile this?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNAT Error - Subunit not found
2006-01-20 0:08 GNAT Error - Subunit not found deepblue2
@ 2006-01-20 0:24 ` John
2006-01-20 0:35 ` deepblue2
2006-01-20 3:56 ` Gautier Write-only
1 sibling, 1 reply; 6+ messages in thread
From: John @ 2006-01-20 0:24 UTC (permalink / raw)
There are specific requirements for the (default) names of files
containing subunits. In your example the subunit should be in file
temp-temp1.adb.
The gnat users' guide describes the convention and explains how to
establish a different convention.
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNAT Error - Subunit not found
2006-01-20 0:24 ` John
@ 2006-01-20 0:35 ` deepblue2
2006-01-20 9:48 ` Georg Bauhaus
0 siblings, 1 reply; 6+ messages in thread
From: deepblue2 @ 2006-01-20 0:35 UTC (permalink / raw)
do you know under what section of user guide is it in?
John wrote:
> There are specific requirements for the (default) names of files
> containing subunits. In your example the subunit should be in file
> temp-temp1.adb.
>
> The gnat users' guide describes the convention and explains how to
> establish a different convention.
>
> John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNAT Error - Subunit not found
2006-01-20 0:08 GNAT Error - Subunit not found deepblue2
2006-01-20 0:24 ` John
@ 2006-01-20 3:56 ` Gautier Write-only
2006-01-20 8:46 ` Adrien Plisson
1 sibling, 1 reply; 6+ messages in thread
From: Gautier Write-only @ 2006-01-20 3:56 UTC (permalink / raw)
deepblue2@gmail.com:
> Hello, I am getting this compiler error for the Ada code. I am trying
> to do this:
>
> package body temp is
>
> procedure temp1 is separate;
>
> than in a file called temp2.adb
>
> separate(temp)
> procedure temp1 is
> begin
> end temp
>
> I am getting compiler error..does any know how would I compile this?
GNAT awaits by default a certain file name for each Ada (sub)unit name.
If you read the error message, it even says which file name it expects:
temp.adb:3:02: warning: subunit "temp.temp1" in file "temp-temp1.adb" not found
HTH
______________________________________________________________
Gautier -- http://www.mysunrise.ch/users/gdm/index.htm
Ada programming -- http://www.mysunrise.ch/users/gdm/gsoft.htm
NB: For a direct answer, e-mail address on the Web site!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNAT Error - Subunit not found
2006-01-20 3:56 ` Gautier Write-only
@ 2006-01-20 8:46 ` Adrien Plisson
0 siblings, 0 replies; 6+ messages in thread
From: Adrien Plisson @ 2006-01-20 8:46 UTC (permalink / raw)
Gautier Write-only wrote:
> GNAT awaits by default a certain file name for each Ada (sub)unit name.
> If you read the error message, it even says which file name it expects:
> temp.adb:3:02: warning: subunit "temp.temp1" in file "temp-temp1.adb" not found
you may auto-generate a file with the expected filename using gnatchop.
it is easier than remembering the naming convention.
fichier temp2.adb:
-%<---------------------
separate( temp )
procedure temp1 is
begin
null;
end temp1;
->%---------------------
then:
D:\>gnatchop -p -w temp2.adb
splitting temp2.adb into:
temp-temp1.adb
--
rien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: GNAT Error - Subunit not found
2006-01-20 0:35 ` deepblue2
@ 2006-01-20 9:48 ` Georg Bauhaus
0 siblings, 0 replies; 6+ messages in thread
From: Georg Bauhaus @ 2006-01-20 9:48 UTC (permalink / raw)
On Thu, 2006-01-19 at 16:35 -0800, deepblue2@gmail.com wrote:
> do you know under what section of user guide is it in?
>
You'll find this explained in the section on GNAT's
compilation model.
Searching the user's guide is usually a way to find
the relevant part. The guides are available in plain text
format, or info file format, too.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-01-20 9:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-20 0:08 GNAT Error - Subunit not found deepblue2
2006-01-20 0:24 ` John
2006-01-20 0:35 ` deepblue2
2006-01-20 9:48 ` Georg Bauhaus
2006-01-20 3:56 ` Gautier Write-only
2006-01-20 8:46 ` Adrien Plisson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox