* Trouble getting started with GNAT for Win95/NT
@ 1997-05-24 0:00 Matthew Kennedy
1997-05-29 0:00 ` Stephen Leake
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Kennedy @ 1997-05-24 0:00 UTC (permalink / raw)
This is a multi-part message in MIME format.
--------------6C5A59B95E88
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello all, (My Ada learning is coming along very nicely, but...)
I've been using GNAT for DOS and now I would like to try out GNAT for
Win95/NT - I use Win95. However when I install it and try to compile any
of my creations, I get this error (by the way, I included the specific
example 'state.adb' as an attachment):
c:\usr >gnatmake state.adb
gcc -c state.adb
state.adb:11:06: "Ada.Numerics.Discrete_Random" is not a predefined
library unit
compilation abandoned
gnatmake: "state.adb" compilation error
c:\usr >
I had no such trouble when using GNAT DOS. Here are some of my
installation details and things I have tried.
1. I use a 486DX4, 24Mb RAM, plenty of hard drive, compilation occurs
in a Win95 DOS box. I have tried a 'typical' installation and I have
also tried a 'custom' installation with all option checked. Result:
same error.
2. Environment variables set:
ADA_INCLUDE_PATH=C:\USR\LOCAL\ADAINCLUDE
ADA_OBJECTS_PATH=C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\ADALIB
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS;C:\USR\BIN;C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\;C:\USR\EMACS-19.34\BIN
LFN=Y
3. Things I've thought of: In my DOS installation, I noticed that my
ADA_OBJECTS_PATH (which has all the .ALI file in it) also had .O files
as well - my Win95 GNAT installation only has .ALI files in the
ADA_OBJECTS_PATH. Have I forgoten to download an archive full of .O
files? Also is my compilation command correct (gnatmake state.adb)?
Should there be any extra linker options as well?
Thank you all,
Matt.
--
Matthew Kennedy
Student of Electronics Engineering, USQ Australia
" Hey pig, nothing's turning out the way I planned "
- Nine Inch Nails
Hell yeah! This just proved it!
--------------6C5A59B95E88
Content-Type: text/plain; charset=us-ascii; name="state.adb"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="state.adb"
--
-- STATE.ADB
--
-- Program to illustrate a state driven approach to determining the
-- parity of continuous bit stream.
--
-- Program also illustrates how to implement a new package based on
-- a previously defined generic package.
--
with Ada.Numerics.Discrete_Random;
with Ada.Text_IO; use Ada.Text_IO;
procedure State is
type Parity is (Odd, Even);
type Bit is (Set, Clear);
package Random_Bit is new Ada.Numerics.Discrete_Random(Bit);
package Parity_IO is new Ada.Text_IO.Enumeration_IO(Parity);
package Bit_IO is new Ada.Text_IO.Enumeration_IO(Bit);
use Random_Bit;
use Parity_IO;
use Bit_IO;
State : Parity := Odd;
Input : Bit;
G : Generator;
begin
for I in 1..10 loop
Input := Random(G);
case State is
when Even =>
if Input = Set then
State := Odd;
end if;
when Odd =>
if Input = Set then
State := Even;
end if;
end case;
Put(Input, Width => 8);
Put(State, Width => 5); New_Line;
delay 1.0;
end loop;
end State;
--------------6C5A59B95E88--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Trouble getting started with GNAT for Win95/NT
1997-05-24 0:00 Trouble getting started with GNAT for Win95/NT Matthew Kennedy
@ 1997-05-29 0:00 ` Stephen Leake
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 1997-05-29 0:00 UTC (permalink / raw)
Matthew Kennedy wrote:
>
> I've been using GNAT for DOS and now I would like to try out GNAT for
> Win95/NT - I use Win95. However when I install it and try to compile any
> of my creations, I get this error (by the way, I included the specific
> example 'state.adb' as an attachment):
This compiles and links fine on my installation of GNAT 3.09 for Windows
95.
> 2. Environment variables set:
>
> ADA_INCLUDE_PATH=C:\USR\LOCAL\ADAINCLUDE
> ADA_OBJECTS_PATH=C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\ADALIB
I don't have these set; try without?
> PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\DOS;C:\USR\BIN;C:\USR\LOCAL\LIB\GCC-LIB\I386-PC-CYGWIN32\2.7.2\;C:\USR\EMACS-19.34\BIN
You shouldn't need ...\i386-pc-cygwin\2.7.2 in your path, but I don't
know why it would hurt.
>
> 3. Things I've thought of: In my DOS installation, I noticed that my
> ADA_OBJECTS_PATH (which has all the .ALI file in it) also had .O files
> as well - my Win95 GNAT installation only has .ALI files in the
> ADA_OBJECTS_PATH. Have I forgoten to download an archive full of .O
> files? Also is my compilation command correct (gnatmake state.adb)?
I'm not sure, but I suspect all the .O files are now in libgnat.a, in
the 2.7.2 directory; make sure that's there.
> Thank you all,
> Matt.
You might post to the gnat-chat mailing list (see http://www.gnat.com/
for directions).
--
- Stephe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-05-29 0:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-24 0:00 Trouble getting started with GNAT for Win95/NT Matthew Kennedy
1997-05-29 0:00 ` Stephen Leake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox