* GNAT 301a with Win95
@ 1996-06-18 0:00 Darrin
1996-06-19 0:00 ` David Hopkins
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Darrin @ 1996-06-18 0:00 UTC (permalink / raw)
Hello everyone!!
I have been trying to get GNAT to compile a program that I know works
with my University account. I have continued to get two errors:
1. "text_io (spec)" is not a language defined unit
2. warning: file name does not match unit name, should be "test.adb"
About the first one. My program starts with: with text_io; use text_io;
There is not a (spec). As for the second, the main procedure is called
test and the file is test.adb. I even tried to compile the examples that
come with GNAT and they don't work either. What am I missing?
BTW, the commad line is as follows:
$ c:/ada/gnat301a/gcc -c c:/ada/lab3/test.adb
I admit that I haven't exhausted all attempts at reading the help file,
but then again, the help file is somewhat confusing...at least to me.
Thanks for your help.
Darrin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-18 0:00 GNAT 301a with Win95 Darrin
@ 1996-06-19 0:00 ` David Hopkins
1996-06-21 0:00 ` Robert Dewar
1996-06-19 0:00 ` Tom Griest
` (2 subsequent siblings)
3 siblings, 1 reply; 13+ messages in thread
From: David Hopkins @ 1996-06-19 0:00 UTC (permalink / raw)
To: Darrin
Darrin wrote:
>
> Hello everyone!!
>
> I have been trying to get GNAT to compile a program that I know works
> with my University account. I have continued to get two errors:
>
> 1. "text_io (spec)" is not a language defined unit
>
> 2. warning: file name does not match unit name, should be "test.adb"
>
> About the first one. My program starts with: with text_io; use text_io;
> There is not a (spec). As for the second, the main procedure is called
> test and the file is test.adb. I even tried to compile the examples that
> come with GNAT and they don't work either. What am I missing?
>
> BTW, the commad line is as follows:
>
> $ c:/ada/gnat301a/gcc -c c:/ada/lab3/test.adb
>
> I admit that I haven't exhausted all attempts at reading the help file,
> but then again, the help file is somewhat confusing...at least to me.
> Thanks for your help.
>
> Darrin
Sometimes it is hard to get to what you really want in the help files,
but I think its the best that can be done considering what there is to
explain. What I think your problem might be is that there is a bunch of
lines that need to be added to your autoexec to make this run, including
things like setting the path to the compiler. Since your command line
calls gcc with the directory name on it, I think you haven't done that,
I expect that Dewar will probably answer this soon, and maybe I'm wrong,
but I thought I'd send that along in case you need something right away.
Take care.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-18 0:00 GNAT 301a with Win95 Darrin
1996-06-19 0:00 ` David Hopkins
@ 1996-06-19 0:00 ` Tom Griest
1996-06-20 0:00 ` Theodore E. Dennison
1996-06-29 0:00 ` test name clash on unix. was: " Nasser Abbasi
3 siblings, 0 replies; 13+ messages in thread
From: Tom Griest @ 1996-06-19 0:00 UTC (permalink / raw)
"Darrin" <darrin@gomontana.com> writes:
> I have been trying to get GNAT to compile a program that I know works
>with my University account. I have continued to get two errors:
>
> 1. "text_io (spec)" is not a language defined unit
This type of error usually indicates that you have not setup the environment
variable ADA_INCLUDE_PATH which tells gnat where to find things like text_io.
This is done by running the "setpath" batch file, which is mentioned
in both the setup program and the very beginning of the readme file.
If you run the setpath program and have not configured Win95 to have
sufficent environment space, then you get an error message while the
setpath is running. Since you didn't mention any such message, my
guess is that this isn't your problem. However, if you ever do see
an "out of environment space" message, the readme file tells you how
to increase your environment space.
> 2. warning: file name does not match unit name, should be "test.adb"
[...]
> for the second, the main procedure is called
>test and the file is test.adb.
>BTW, the commad line is as follows:
>
> $ c:/ada/gnat301a/gcc -c c:/ada/lab3/test.adb
This does not look like a typical Win95 command invocation. For one
thing, you should be using '\' instead of '/'. Is it possible you
are running some command shell other than the one that comes with Win95?
Try invoking the setpath program, changing directory to the place
where your program is, and typing
gcc -c test.adb
>I admit that I haven't exhausted all attempts at reading the help file,
>but then again, the help file is somewhat confusing...at least to me.
Perhaps you could send me (via email) specific examples of what you
find confusing and I will see if they can be made simpler.
-Tom
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-18 0:00 GNAT 301a with Win95 Darrin
1996-06-19 0:00 ` David Hopkins
1996-06-19 0:00 ` Tom Griest
@ 1996-06-20 0:00 ` Theodore E. Dennison
1996-06-21 0:00 ` Robert Dewar
1996-06-21 0:00 ` Vadim Epmak
1996-06-29 0:00 ` test name clash on unix. was: " Nasser Abbasi
3 siblings, 2 replies; 13+ messages in thread
From: Theodore E. Dennison @ 1996-06-20 0:00 UTC (permalink / raw)
Darrin wrote:
> I have been trying to get GNAT to compile a program that I know works
> with my University account. I have continued to get two errors:
Gnat is an Ada (95) compiler. If your "University account" is an Ada 83 compiler,
then there is no guarantee that code from one will compile with the other without
errors. They are two (slightly) different languages.
> 2. warning: file name does not match unit name, should be "test.adb"
This seems pretty clear to me. Rename your file to "test.adb".
--
T.E.D.
| Work - mailto:dennison@escmail.orl.mmc.com |
| Home - mailto:dennison@iag.net |
| URL - http://www.iag.net/~dennison |
^ permalink raw reply [flat|nested] 13+ messages in thread
* GNAT 301a with Win95
1996-06-20 0:00 ` Theodore E. Dennison
1996-06-21 0:00 ` Robert Dewar
@ 1996-06-21 0:00 ` Vadim Epmak
1996-06-23 0:00 ` Robert Dewar
` (2 more replies)
1 sibling, 3 replies; 13+ messages in thread
From: Vadim Epmak @ 1996-06-21 0:00 UTC (permalink / raw)
Hello Theodore!
20 Jun 96, Theodore E. Dennison writes to All:
TED> Gnat is an Ada (95) compiler. If your "University account" is an Ada 83
TED> compiler, then there is no guarantee that code from one will compile with
TED> the other without errors. They are two (slightly) different languages.
How about -gnat83 option ? 8)
With Best Wishes, Vadim
21 Jun 96, 14:42
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-20 0:00 ` Theodore E. Dennison
@ 1996-06-21 0:00 ` Robert Dewar
1996-06-21 0:00 ` Vadim Epmak
1 sibling, 0 replies; 13+ messages in thread
From: Robert Dewar @ 1996-06-21 0:00 UTC (permalink / raw)
Darrin complained about some problems, and T.E.D. said
"> 2. warning: file name does not match unit name, should be "test.adb"
This seems pretty clear to me. Rename your file to "test.adb"."
ALERT ALERT! don't fall into the remarkably common trap of calling your
main program test and then trying to execute it with the command
test
which in Unix will typically do nothing.
We get this bug report all the time, once complete with a long diatribe
about how GNAT was completely useless.
(test is an internal shell command in Unix, either use some other name, or
execute the program using ./test)
:-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-19 0:00 ` David Hopkins
@ 1996-06-21 0:00 ` Robert Dewar
0 siblings, 0 replies; 13+ messages in thread
From: Robert Dewar @ 1996-06-21 0:00 UTC (permalink / raw)
Darrin wrote:
"> Hello everyone!!
>
> I have been trying to get GNAT to compile a program that I know works
> with my University account. I have continued to get two errors:
>
> 1. "text_io (spec)" is not a language defined unit"
This is a result of not following the installation instructions carefully.
It means that the standard library is not on your path, or otherwise
accessible to GNAT, which it would be if you had correctly installed it.
It really is important to follow *every* step and to completely read the
readme files.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-21 0:00 ` Vadim Epmak
@ 1996-06-23 0:00 ` Robert Dewar
1996-06-24 0:00 ` Theodore E. Dennison
1996-06-25 0:00 ` Walter B. Hollman Sr.
2 siblings, 0 replies; 13+ messages in thread
From: Robert Dewar @ 1996-06-23 0:00 UTC (permalink / raw)
Vadim said:
" How about -gnat83 option ?"
The -gnat83 switch does provide greater compatibility with Ada 83, for
example:
new Ada 95 keywords not recognized
Numeric Error distinct from Constraint_Error
error checks for later declarations performed
etc.
but it does not guarantee complete Ada 83 compatibility. There are some
places where obscure differences in overloading etc are simply not practical
to implement.
Also, note that type Character is always 8 bits, since this was permitted
in Ada 83 (by virtue of the Zandvort WG9 decision) in any case.
If you find cases where you think it would be helpful for the -gnat83
switch to do more, then by all means let us know, but we do not promise
to be able to fix all such cases.
We notice some people using -gnat83 routinely because they are compiling
Ada 83 code. That's probably not a good idea for two reasons:
1. If there are incompatibilities, then they should be found earlier
rather than later, since most code will be migrated, or at least
partially reused, to Ada 95 contexts sooner or later.
2. Since -gnat83 does not provide a guarantee of Ada 83 semantics, you
are working in a somewhat ill defined semantic framework when you
use this option.
We retain it for specialized uses, e.g. running old Ada 83 test suites,
rather than general purpose use.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-21 0:00 ` Vadim Epmak
1996-06-23 0:00 ` Robert Dewar
@ 1996-06-24 0:00 ` Theodore E. Dennison
1996-06-25 0:00 ` Walter B. Hollman Sr.
2 siblings, 0 replies; 13+ messages in thread
From: Theodore E. Dennison @ 1996-06-24 0:00 UTC (permalink / raw)
Vadim Epmak wrote:
>
> Hello Theodore!
>
> 20 Jun 96, Theodore E. Dennison writes to All:
>
> TED> Gnat is an Ada (95) compiler. If your "University account" is an Ada 83
> TED> compiler, then there is no guarantee that code from one will compile with
> TED> the other without errors. They are two (slightly) different languages.
>
> How about -gnat83 option ? 8)
>
That's helpful, but not bulletproof. Try using it with Sequential_IO.
(Well...I haven't tried this lately, but 2 years ago it wouldn't work).
--
T.E.D.
| Work - mailto:dennison@escmail.orl.mmc.com |
| Home - mailto:dennison@iag.net |
| URL - http://www.iag.net/~dennison |
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: GNAT 301a with Win95
1996-06-21 0:00 ` Vadim Epmak
1996-06-23 0:00 ` Robert Dewar
1996-06-24 0:00 ` Theodore E. Dennison
@ 1996-06-25 0:00 ` Walter B. Hollman Sr.
2 siblings, 0 replies; 13+ messages in thread
From: Walter B. Hollman Sr. @ 1996-06-25 0:00 UTC (permalink / raw)
On Jun 21, 1996 11:43:00 in article <GNAT 301a with Win95>,
'Vadim.Epmak@p66.f79.n5100.z2.fidonet.org (Vadim Epmak)' wrote:
>Hello Theodore!
>
>20 Jun 96, Theodore E. Dennison writes to All:
>
>TED> Gnat is an Ada (95) compiler. If your "University account" is an Ada
83
>TED> compiler, then there is no guarantee that code from one will compile
with
>TED> the other without errors. They are two (slightly) different
languages.
>
>How about -gnat83 option ? 8)
>
>With Best Wishes, Vadim
>21 Jun 96, 14:42
--
Works for me! From DOS to NT no problem
Walter B. Hollman Sr
^ permalink raw reply [flat|nested] 13+ messages in thread
* test name clash on unix. was: GNAT 301a with Win95
1996-06-18 0:00 GNAT 301a with Win95 Darrin
` (2 preceding siblings ...)
1996-06-20 0:00 ` Theodore E. Dennison
@ 1996-06-29 0:00 ` Nasser Abbasi
1996-06-29 0:00 ` Richard Kenner
1996-06-29 0:00 ` Robert Dewar
3 siblings, 2 replies; 13+ messages in thread
From: Nasser Abbasi @ 1996-06-29 0:00 UTC (permalink / raw)
From: dewar@cs.nyu.edu (Robert Dewar)
ALERT ALERT! don't fall into the remarkably common trap of calling your
main program test and then trying to execute it with the command
test
which in Unix will typically do nothing.
We get this bug report all the time, once complete with a long diatribe
about how GNAT was completely useless.
(test is an internal shell command in Unix, either use some other name, or
execute the program using ./test)
:-)
Yes, good suggestions. Also one can add "." to the $path (edit
the .cshrc or .profile etc..) , make "." be the first in the path,
and when one invokes test, the shell will first look in . which is
the default current directory and use your "test" program , not the
one in /usr/bin .
I think it is not very smart of unix to call one of its images such
a generic name as "test" . But again, this is unix, if they did not
do such weired things, they will no longer be unix, but on the other
hand this is why we love unix, it is just different, and can surprise
one at any time, so it makes it interesting and more fun to work with
it.
thanks,
Nasser
--
Nasser Abbasi. C/C++/Ada Solaris. GeneAssist - A client/server application
for Nucleic acid and protein sequence search and analysis.
PE-Applied BioSystem division. email: nasser@apldbio.com
MSEE(control), MSCS, MSCE, FM(Fide Chess Master 1.e4 !! 1-0 )
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: test name clash on unix. was: GNAT 301a with Win95
1996-06-29 0:00 ` test name clash on unix. was: " Nasser Abbasi
1996-06-29 0:00 ` Richard Kenner
@ 1996-06-29 0:00 ` Robert Dewar
1 sibling, 0 replies; 13+ messages in thread
From: Robert Dewar @ 1996-06-29 0:00 UTC (permalink / raw)
Nasser said
"Yes, good suggestions. Also one can add "." to the $path (edit
the .cshrc or .profile etc..) , make "." be the first in the path,
and when one invokes test, the shell will first look in . which is
the default current directory and use your "test" program , not the
one in /usr/bin ."
First, this does not work, at least in many systems, because test is
a shell command, not the name of something in /usr/bin, and thus
takes precedence over the path.
Second, putting . at the start of your path is not a good idea. In many
Unix environments, this practice is forbidden. The reason is that it is
a security risk, you can pick up unintended replacements for standard
system stuff this way, and a number of penetrations of Unix systems have
used this trick to get illicit information.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: test name clash on unix. was: GNAT 301a with Win95
1996-06-29 0:00 ` test name clash on unix. was: " Nasser Abbasi
@ 1996-06-29 0:00 ` Richard Kenner
1996-06-29 0:00 ` Robert Dewar
1 sibling, 0 replies; 13+ messages in thread
From: Richard Kenner @ 1996-06-29 0:00 UTC (permalink / raw)
In article <nhspbergdo.fsf_-_@paralysys> nasser@apldbio.com (Nasser Abbasi) writes:
>Yes, good suggestions. Also one can add "." to the $path (edit
>the .cshrc or .profile etc..) , make "." be the first in the path,
This is VERY DANGEROUS on a shared system if you may have malicous
users (or ones that want to play jokes on you)!
Somebody can say "Hey, look at what I have in my directory FOO." and
you'd "cd ~user/foo" and do "ls". But if what he had in that directory
was an executable file called "ls", THAT'S the one you run and it
might do something really nasty (like "rm -rf ~").
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~1996-06-29 0:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-18 0:00 GNAT 301a with Win95 Darrin
1996-06-19 0:00 ` David Hopkins
1996-06-21 0:00 ` Robert Dewar
1996-06-19 0:00 ` Tom Griest
1996-06-20 0:00 ` Theodore E. Dennison
1996-06-21 0:00 ` Robert Dewar
1996-06-21 0:00 ` Vadim Epmak
1996-06-23 0:00 ` Robert Dewar
1996-06-24 0:00 ` Theodore E. Dennison
1996-06-25 0:00 ` Walter B. Hollman Sr.
1996-06-29 0:00 ` test name clash on unix. was: " Nasser Abbasi
1996-06-29 0:00 ` Richard Kenner
1996-06-29 0:00 ` Robert Dewar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox